Don't put the text of an autolink in Code font.

This commit is contained in:
John MacFarlane 2013-01-06 20:51:51 -08:00
parent 300f8528da
commit 8c48bd8feb
31 changed files with 74 additions and 65 deletions

View file

@ -877,15 +877,15 @@ parseInline (Elem e) =
"varargs" -> return $ code "(...)"
"xref" -> return $ str "?" -- so at least you know something is there
"email" -> return $ link ("mailto:" ++ strContent e) ""
$ code $ strContent e
"uri" -> return $ link (strContent e) "" $ code $ strContent e
$ str $ strContent e
"uri" -> return $ link (strContent e) "" $ str $ strContent e
"ulink" -> link (attrValue "url" e) "" <$> innerInlines
"link" -> do
ils <- innerInlines
let href = case findAttr (QName "href" (Just "http://www.w3.org/1999/xlink") Nothing) e of
Just h -> h
_ -> ('#' : attrValue "linkend" e)
let ils' = if ils == mempty then code href else ils
let ils' = if ils == mempty then str href else ils
return $ link href "" ils'
"foreignphrase" -> emph <$> innerInlines
"emphasis" -> case attrValue "role" e of

View file

@ -426,7 +426,7 @@ inlineCommands = M.fromList $
, ("lstinline", doverb)
, ("texttt", (code . stringify . toList) <$> tok)
, ("url", (unescapeURL <$> braced) >>= \url ->
pure (link url "" (codeWith ("",["url"],[]) url)))
pure (link url "" (str url)))
, ("href", (unescapeURL <$> braced <* optional sp) >>= \url ->
tok >>= \lab ->
pure (link url "" lab))

View file

@ -1519,14 +1519,14 @@ bareURL :: MarkdownParser (F Inlines)
bareURL = try $ do
guardEnabled Ext_autolink_urls
(orig, src) <- uri <|> emailAddress
return $ return $ B.link src "" (B.codeWith ("",["url"],[]) orig)
return $ return $ B.link src "" (B.str orig)
autoLink :: MarkdownParser (F Inlines)
autoLink = try $ do
char '<'
(orig, src) <- uri <|> emailAddress
char '>'
return $ return $ B.link src "" (B.codeWith ("",["url"],[]) orig)
return $ return $ B.link src "" (B.str orig)
image :: MarkdownParser (F Inlines)
image = try $ do

View file

@ -343,8 +343,8 @@ inlineToAsciiDoc opts (Link txt (src, _tit)) = do
else empty
let srcSuffix = if isPrefixOf "mailto:" src then drop 7 src else src
let useAuto = case txt of
[Code _ s] | s == srcSuffix -> True
_ -> False
[Str s] | escapeURI s == srcSuffix -> True
_ -> False
return $ if useAuto
then text srcSuffix
else prefix <> text src <> "[" <> linktext <> "]"

View file

@ -34,7 +34,7 @@ import Text.Pandoc.Shared
import Text.Pandoc.Options
import Text.Pandoc.Generic (queryWith)
import Text.Printf ( printf )
import Data.List ( intercalate )
import Data.List ( intercalate, isPrefixOf )
import Control.Monad.State
import Text.Pandoc.Pretty
import Text.Pandoc.Templates ( renderTemplate )
@ -280,7 +280,11 @@ inlineToConTeXt (RawInline _ _) = return empty
inlineToConTeXt (LineBreak) = return $ text "\\crlf" <> cr
inlineToConTeXt Space = return space
-- autolink
inlineToConTeXt (Link [Code _ str] (src, tit)) = inlineToConTeXt (Link
inlineToConTeXt (Link [Str str] (src, tit))
| if "mailto:" `isPrefixOf` src
then src == escapeURI ("mailto:" ++ str)
else src == escapeURI str =
inlineToConTeXt (Link
[RawInline "context" "\\hyphenatedurl{", Str str, RawInline "context" "}"]
(src, tit))
-- Handle HTML-like internal document references to sections

View file

@ -289,7 +289,7 @@ inlineToDocbook opts (Link txt (src, _)) =
emailLink = inTagsSimple "email" $ text $
escapeStringForXML $ src'
in case txt of
[Code _ s] | s == src' -> emailLink
[Str s] | escapeURI s == src' -> emailLink
_ -> inlinesToDocbook opts txt <+>
char '(' <> emailLink <> char ')'
else (if isPrefixOf "#" src

View file

@ -675,7 +675,9 @@ inlineToHtml opts inline =
_ -> return mempty
(RawInline "html" str) -> return $ preEscapedString str
(RawInline _ _) -> return mempty
(Link [Code _ str] (s,_)) | "mailto:" `isPrefixOf` s ->
(Link [Str str] (s,_)) | "mailto:" `isPrefixOf` s &&
s == escapeURI ("mailto" ++ str) ->
-- autolink
return $ obfuscateLink opts str s
(Link txt (s,_)) | "mailto:" `isPrefixOf` s -> do
linkText <- inlineListToHtml opts txt

View file

@ -593,7 +593,7 @@ inlineToLaTeX (Link txt ('#':ident, _)) = do
return $ text "\\hyperref" <> brackets (text ident') <> braces contents
inlineToLaTeX (Link txt (src, _)) =
case txt of
[Code _ x] | x == src -> -- autolink
[Str x] | x == src -> -- autolink
do modify $ \s -> s{ stUrl = True }
src' <- stringToLaTeX True x
return $ text $ "\\url{" ++ src' ++ "}"

View file

@ -332,8 +332,9 @@ inlineToMan opts (Link txt (src, _)) = do
linktext <- inlineListToMan opts txt
let srcSuffix = if isPrefixOf "mailto:" src then drop 7 src else src
return $ case txt of
[Code _ s]
| s == srcSuffix -> char '<' <> text srcSuffix <> char '>'
[Str s]
| escapeURI s == srcSuffix ->
char '<' <> text srcSuffix <> char '>'
_ -> linktext <> text " (" <> text src <> char ')'
inlineToMan opts (Image alternate (source, tit)) = do
let txt = if (null alternate) || (alternate == [Str ""]) ||

View file

@ -630,8 +630,8 @@ inlineToMarkdown opts (Link txt (src, tit)) = do
else text $ " \"" ++ tit ++ "\""
let srcSuffix = if isPrefixOf "mailto:" src then drop 7 src else src
let useAuto = case (tit,txt) of
("", [Code _ s]) | s == srcSuffix -> True
_ -> False
("", [Str s]) | escapeURI s == srcSuffix -> True
_ -> False
let useRefLinks = writerReferenceLinks opts && not useAuto
ref <- if useRefLinks then getReference txt (src, tit) else return []
reftext <- inlineListToMarkdown opts ref

View file

@ -378,7 +378,7 @@ inlineToMediaWiki _ Space = return " "
inlineToMediaWiki opts (Link txt (src, _)) = do
label <- inlineListToMediaWiki opts txt
case txt of
[Code _ s] | s == src -> return src
[Str s] | escapeURI s == src -> return src
_ -> if isURI src
then return $ "[" ++ src ++ " " ++ label ++ "]"
else return $ "[[" ++ src' ++ "|" ++ label ++ "]]"

View file

@ -271,7 +271,7 @@ inlineToOrg (LineBreak) = return cr -- there's no line break in Org
inlineToOrg Space = return space
inlineToOrg (Link txt (src, _)) = do
case txt of
[Code _ x] | x == src -> -- autolink
[Str x] | escapeURI x == src -> -- autolink
do modify $ \s -> s{ stLinks = True }
return $ "[[" <> text x <> "]]"
_ -> do contents <- inlineListToOrg txt

View file

@ -348,8 +348,11 @@ inlineToRST (RawInline "rst" x) = return $ text x
inlineToRST (RawInline _ _) = return empty
inlineToRST (LineBreak) = return cr -- there's no line break in RST
inlineToRST Space = return space
inlineToRST (Link [Code _ str] (src, _)) | src == str ||
src == "mailto:" ++ str = do
-- autolink
inlineToRST (Link [Str str] (src, _))
| if "mailto:" `isPrefixOf` src
then src == escapeURI ("mailto:" ++ str)
else src == escapeURI str = do
let srcSuffix = if isPrefixOf "mailto:" src then drop 7 src else src
return $ text srcSuffix
inlineToRST (Link [Image alt (imgsrc,imgtit)] (src, _tit)) = do

View file

@ -425,7 +425,7 @@ inlineToTexinfo (Link txt (src@('#':_), _)) = do
braces (text (stringToTexinfo src) <> text "," <> contents)
inlineToTexinfo (Link txt (src, _)) = do
case txt of
[Code _ x] | x == src -> -- autolink
[Str x] | escapeURI x == src -> -- autolink
do return $ text $ "@url{" ++ x ++ "}"
_ -> do contents <- escapeCommas $ inlineListToTexinfo txt
let src1 = stringToTexinfo src

View file

@ -915,7 +915,7 @@ These should not be escaped: \$ \\ \&gt; \[ \{
<title>Autolinks</title>
<para>
With an ampersand:
<ulink url="http://example.com/?foo=1&amp;bar=2"><literal>http://example.com/?foo=1&amp;bar=2</literal></ulink>
<ulink url="http://example.com/?foo=1&amp;bar=2">http://example.com/?foo=1&amp;bar=2</ulink>
</para>
<itemizedlist>
<listitem>
@ -925,7 +925,7 @@ These should not be escaped: \$ \\ \&gt; \[ \{
</listitem>
<listitem>
<para>
<ulink url="http://example.com/"><literal>http://example.com/</literal></ulink>
<ulink url="http://example.com/">http://example.com/</ulink>
</para>
</listitem>
<listitem>
@ -940,7 +940,7 @@ These should not be escaped: \$ \\ \&gt; \[ \{
<blockquote>
<para>
Blockquoted:
<ulink url="http://example.com/"><literal>http://example.com/</literal></ulink>
<ulink url="http://example.com/">http://example.com/</ulink>
</para>
</blockquote>
<para>

View file

@ -227,7 +227,7 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
,Para [Link [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","")]
,Para [Link [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","")]
,Para [Link [Str "with_underscore"] ("/url/with_underscore","")]
,Para [Link [Code ("",[],[]) "nobody@nowhere.net"] ("mailto:nobody@nowhere.net","")]
,Para [Link [Str "nobody@nowhere.net"] ("mailto:nobody@nowhere.net","")]
,Para [Link [Str "Empty"] ("",""),Str "."]
,Header 2 [Str "Reference"]
,Para [Str "Foo",Space,Link [Str "bar"] ("/url/",""),Str "."]
@ -248,14 +248,14 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
,Para [Str "Here\8217s",Space,Str "an",Space,Link [Str "inline",Space,Str "link"] ("/script?foo=1&bar=2",""),Str "."]
,Para [Str "Here\8217s",Space,Str "an",Space,Link [Str "inline",Space,Str "link",Space,Str "in",Space,Str "pointy",Space,Str "braces"] ("/script?foo=1&bar=2",""),Str "."]
,Header 2 [Str "Autolinks"]
,Para [Str "With",Space,Str "an",Space,Str "ampersand:",Space,Link [Code ("",[],[]) "http://example.com/?foo=1&bar=2"] ("http://example.com/?foo=1&bar=2","")]
,Para [Str "With",Space,Str "an",Space,Str "ampersand:",Space,Link [Str "http://example.com/?foo=1&bar=2"] ("http://example.com/?foo=1&bar=2","")]
,BulletList
[[Para [Str "In",Space,Str "a",Space,Str "list?"]]
,[Para [Link [Code ("",[],[]) "http://example.com/"] ("http://example.com/","")]]
,[Para [Link [Str "http://example.com/"] ("http://example.com/","")]]
,[Para [Str "It",Space,Str "should."]]]
,Para [Str "An",Space,Str "e-mail",Space,Str "address:",Space,Link [Code ("",[],[]) "nobody@nowhere.net"] ("mailto:nobody@nowhere.net","")]
,Para [Str "An",Space,Str "e-mail",Space,Str "address:",Space,Link [Str "nobody@nowhere.net"] ("mailto:nobody@nowhere.net","")]
,BlockQuote
[Para [Str "Blockquoted:",Space,Link [Code ("",[],[]) "http://example.com/"] ("http://example.com/","")]]
[Para [Str "Blockquoted:",Space,Link [Str "http://example.com/"] ("http://example.com/","")]]
,Para [Str "Auto-links",Space,Str "should",Space,Str "not",Space,Str "occur",Space,Str "here:",Space,Code ("",[],[]) "<http://example.com/>"]
,CodeBlock ("",[],[]) "or here: <http://example.com/>"
,Header 1 [Str "Images"]

View file

@ -780,7 +780,7 @@ With an ampersand: \url{http://example.com/?foo=1&bar=2}
It should.
\end{itemize}
An e-mail address:
\href{mailto:nobody@nowhere.net}{\texttt{nobody@nowhere.net}}
\href{mailto:nobody@nowhere.net}{nobody@nowhere.net}
\begin{quote}
Blockquoted: \url{http://example.com/}

View file

@ -348,14 +348,14 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
,Para [Str "Here\8217s",Space,Str "an",Space,Link [Str "inline",Space,Str "link"] ("/script?foo=1&bar=2",""),Str "."]
,Para [Str "Here\8217s",Space,Str "an",Space,Link [Str "inline",Space,Str "link",Space,Str "in",Space,Str "pointy",Space,Str "braces"] ("/script?foo=1&bar=2",""),Str "."]
,Header 2 [Str "Autolinks"]
,Para [Str "With",Space,Str "an",Space,Str "ampersand:",Space,Link [Code ("",["url"],[]) "http://example.com/?foo=1&bar=2"] ("http://example.com/?foo=1&bar=2","")]
,Para [Str "With",Space,Str "an",Space,Str "ampersand:",Space,Link [Str "http://example.com/?foo=1&bar=2"] ("http://example.com/?foo=1&bar=2","")]
,BulletList
[[Para [Str "In",Space,Str "a",Space,Str "list?"]]
,[Para [Link [Code ("",["url"],[]) "http://example.com/"] ("http://example.com/","")]]
,[Para [Link [Str "http://example.com/"] ("http://example.com/","")]]
,[Para [Str "It",Space,Str "should."]]]
,Para [Str "An",Space,Str "e-mail",Space,Str "address:",Space,Link [Code ("",[],[]) "nobody@nowhere.net"] ("mailto:nobody@nowhere.net","")]
,Para [Str "An",Space,Str "e-mail",Space,Str "address:",Space,Link [Str "nobody@nowhere.net"] ("mailto:nobody@nowhere.net","")]
,BlockQuote
[Para [Str "Blockquoted:",Space,Link [Code ("",["url"],[]) "http://example.com/"] ("http://example.com/","")]]
[Para [Str "Blockquoted:",Space,Link [Str "http://example.com/"] ("http://example.com/","")]]
,Para [Str "Auto-links",Space,Str "should",Space,Str "not",Space,Str "occur",Space,Str "here:",Space,Code ("",[],[]) "<http://example.com/>"]
,CodeBlock ("",[],[]) "or here: <http://example.com/>"
,HorizontalRule

View file

@ -31,7 +31,7 @@
,Header 2 [Str "Multilingual",Space,Str "URLs"]
,Para [RawInline "html" "<http://\27979.com?\27979=\27979>"]
,Para [Link [Str "foo"] ("/bar/\27979?x=\27979","title")]
,Para [Link [Code ("",["url"],[]) "\27979@foo.\27979.baz"] ("mailto:\27979@foo.\27979.baz","")]
,Para [Link [Str "\27979@foo.\27979.baz"] ("mailto:\27979@foo.\27979.baz","")]
,Header 2 [Str "Numbered",Space,Str "examples"]
,OrderedList (1,Example,TwoParens)
[[Plain [Str "First",Space,Str "example."]]

View file

@ -371,14 +371,14 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
,Para [Str "Here\8217s",Space,Str "an",Space,Link [Str "inline",Space,Str "link"] ("/script?foo=1&bar=2",""),Str "."]
,Para [Str "Here\8217s",Space,Str "an",Space,Link [Str "inline",Space,Str "link",Space,Str "in",Space,Str "pointy",Space,Str "braces"] ("/script?foo=1&bar=2",""),Str "."]
,Header 2 [Str "Autolinks"]
,Para [Str "With",Space,Str "an",Space,Str "ampersand:",Space,Link [Code ("",["url"],[]) "http://example.com/?foo=1&bar=2"] ("http://example.com/?foo=1&bar=2","")]
,Para [Str "With",Space,Str "an",Space,Str "ampersand:",Space,Link [Str "http://example.com/?foo=1&bar=2"] ("http://example.com/?foo=1&bar=2","")]
,BulletList
[[Plain [Str "In",Space,Str "a",Space,Str "list?"]]
,[Plain [Link [Code ("",["url"],[]) "http://example.com/"] ("http://example.com/","")]]
,[Plain [Link [Str "http://example.com/"] ("http://example.com/","")]]
,[Plain [Str "It",Space,Str "should."]]]
,Para [Str "An",Space,Str "e-mail",Space,Str "address:",Space,Link [Code ("",["url"],[]) "nobody@nowhere.net"] ("mailto:nobody@nowhere.net","")]
,Para [Str "An",Space,Str "e-mail",Space,Str "address:",Space,Link [Str "nobody@nowhere.net"] ("mailto:nobody@nowhere.net","")]
,BlockQuote
[Para [Str "Blockquoted:",Space,Link [Code ("",["url"],[]) "http://example.com/"] ("http://example.com/","")]]
[Para [Str "Blockquoted:",Space,Link [Str "http://example.com/"] ("http://example.com/","")]]
,Para [Str "Auto-links",Space,Str "should",Space,Str "not",Space,Str "occur",Space,Str "here:",Space,Code ("",[],[]) "<http://example.com/>"]
,CodeBlock ("",[],[]) "or here: <http://example.com/>"
,HorizontalRule

View file

@ -1323,7 +1323,7 @@ These should not be escaped: \$ \\ \&gt; \[ \{
<title>Autolinks</title>
<para>
With an ampersand:
<ulink url="http://example.com/?foo=1&amp;bar=2"><literal>http://example.com/?foo=1&amp;bar=2</literal></ulink>
<ulink url="http://example.com/?foo=1&amp;bar=2">http://example.com/?foo=1&amp;bar=2</ulink>
</para>
<itemizedlist>
<listitem>
@ -1333,7 +1333,7 @@ These should not be escaped: \$ \\ \&gt; \[ \{
</listitem>
<listitem>
<para>
<ulink url="http://example.com/"><literal>http://example.com/</literal></ulink>
<ulink url="http://example.com/">http://example.com/</ulink>
</para>
</listitem>
<listitem>
@ -1348,7 +1348,7 @@ These should not be escaped: \$ \\ \&gt; \[ \{
<blockquote>
<para>
Blockquoted:
<ulink url="http://example.com/"><literal>http://example.com/</literal></ulink>
<ulink url="http://example.com/">http://example.com/</ulink>
</para>
</blockquote>
<para>

File diff suppressed because one or more lines are too long

View file

@ -524,10 +524,10 @@ document.write('<a h'+'ref'+'="ma'+'ilto'+':'+e+'">'+'Email link'+'<\/'+'a'+'>')
<p>Heres an <a href="/script?foo=1&amp;bar=2">inline link</a>.</p>
<p>Heres an <a href="/script?foo=1&amp;bar=2">inline link in pointy braces</a>.</p>
<h2 id="autolinks">Autolinks</h2>
<p>With an ampersand: <a href="http://example.com/?foo=1&amp;bar=2"><code class="url">http://example.com/?foo=1&amp;bar=2</code></a></p>
<p>With an ampersand: <a href="http://example.com/?foo=1&amp;bar=2">http://example.com/?foo=1&amp;bar=2</a></p>
<ul>
<li>In a list?</li>
<li><a href="http://example.com/"><code class="url">http://example.com/</code></a></li>
<li><a href="http://example.com/">http://example.com/</a></li>
<li>It should.</li>
</ul>
<p>An e-mail address: <script type="text/javascript">
@ -537,7 +537,7 @@ document.write('<a h'+'ref'+'="ma'+'ilto'+':'+e+'">'+'<code>'+e+'</code>'+'<\/'+
// -->
</script><noscript>&#110;&#x6f;&#98;&#x6f;&#100;&#x79;&#32;&#x61;&#116;&#32;&#110;&#x6f;&#x77;&#104;&#x65;&#114;&#x65;&#32;&#100;&#x6f;&#116;&#32;&#110;&#x65;&#116;</noscript></p>
<blockquote>
<p>Blockquoted: <a href="http://example.com/"><code class="url">http://example.com/</code></a></p>
<p>Blockquoted: <a href="http://example.com/">http://example.com/</a></p>
</blockquote>
<p>Auto-links should not occur here: <code>&lt;http://example.com/&gt;</code></p>
<pre><code>or here: &lt;http://example.com/&gt;</code></pre>

View file

@ -854,8 +854,7 @@ With an ampersand: \url{http://example.com/?foo=1\&bar=2}
It should.
\end{itemize}
An e-mail address:
\href{mailto:nobody@nowhere.net}{\texttt{nobody@nowhere.net}}
An e-mail address: \href{mailto:nobody@nowhere.net}{nobody@nowhere.net}
\begin{quote}
Blockquoted: \url{http://example.com/}

View file

@ -610,7 +610,7 @@ With an ampersand: http://example.com/?foo=1&bar=2
* http://example.com/
* It should.
An e-mail address: [mailto:nobody@nowhere.net <code>nobody@nowhere.net</code>]
An e-mail address: [mailto:nobody@nowhere.net nobody@nowhere.net]
<blockquote>Blockquoted: http://example.com/
</blockquote>

View file

@ -371,14 +371,14 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
,Para [Str "Here\8217s",Space,Str "an",Space,Link [Str "inline",Space,Str "link"] ("/script?foo=1&bar=2",""),Str "."]
,Para [Str "Here\8217s",Space,Str "an",Space,Link [Str "inline",Space,Str "link",Space,Str "in",Space,Str "pointy",Space,Str "braces"] ("/script?foo=1&bar=2",""),Str "."]
,Header 2 [Str "Autolinks"]
,Para [Str "With",Space,Str "an",Space,Str "ampersand:",Space,Link [Code ("",["url"],[]) "http://example.com/?foo=1&bar=2"] ("http://example.com/?foo=1&bar=2","")]
,Para [Str "With",Space,Str "an",Space,Str "ampersand:",Space,Link [Str "http://example.com/?foo=1&bar=2"] ("http://example.com/?foo=1&bar=2","")]
,BulletList
[[Plain [Str "In",Space,Str "a",Space,Str "list?"]]
,[Plain [Link [Code ("",["url"],[]) "http://example.com/"] ("http://example.com/","")]]
,[Plain [Link [Str "http://example.com/"] ("http://example.com/","")]]
,[Plain [Str "It",Space,Str "should."]]]
,Para [Str "An",Space,Str "e-mail",Space,Str "address:",Space,Link [Code ("",["url"],[]) "nobody@nowhere.net"] ("mailto:nobody@nowhere.net","")]
,Para [Str "An",Space,Str "e-mail",Space,Str "address:",Space,Link [Str "nobody@nowhere.net"] ("mailto:nobody@nowhere.net","")]
,BlockQuote
[Para [Str "Blockquoted:",Space,Link [Code ("",["url"],[]) "http://example.com/"] ("http://example.com/","")]]
[Para [Str "Blockquoted:",Space,Link [Str "http://example.com/"] ("http://example.com/","")]]
,Para [Str "Auto-links",Space,Str "should",Space,Str "not",Space,Str "occur",Space,Str "here:",Space,Code ("",[],[]) "<http://example.com/>"]
,CodeBlock ("",[],[]) "or here: <http://example.com/>"
,HorizontalRule

View file

@ -1540,22 +1540,22 @@ link</text:span></text:a>.</text:p>
link in pointy braces</text:span></text:a>.</text:p>
<text:h text:style-name="Heading_20_2" text:outline-level="2">Autolinks</text:h>
<text:p text:style-name="First_20_paragraph">With an ampersand:
<text:a xlink:type="simple" xlink:href="http://example.com/?foo=1&amp;bar=2" office:name=""><text:span text:style-name="Definition"><text:span text:style-name="Teletype">http://example.com/?foo=1&amp;bar=2</text:span></text:span></text:a></text:p>
<text:a xlink:type="simple" xlink:href="http://example.com/?foo=1&amp;bar=2" office:name=""><text:span text:style-name="Definition">http://example.com/?foo=1&amp;bar=2</text:span></text:a></text:p>
<text:list text:style-name="L29">
<text:list-item>
<text:p text:style-name="P55">In a list?</text:p>
</text:list-item>
<text:list-item>
<text:p text:style-name="P55"><text:a xlink:type="simple" xlink:href="http://example.com/" office:name=""><text:span text:style-name="Definition"><text:span text:style-name="Teletype">http://example.com/</text:span></text:span></text:a></text:p>
<text:p text:style-name="P55"><text:a xlink:type="simple" xlink:href="http://example.com/" office:name=""><text:span text:style-name="Definition">http://example.com/</text:span></text:a></text:p>
</text:list-item>
<text:list-item>
<text:p text:style-name="P55">It should.</text:p>
</text:list-item>
</text:list>
<text:p text:style-name="First_20_paragraph">An e-mail address:
<text:a xlink:type="simple" xlink:href="mailto:nobody@nowhere.net" office:name=""><text:span text:style-name="Definition"><text:span text:style-name="Teletype">nobody@nowhere.net</text:span></text:span></text:a></text:p>
<text:a xlink:type="simple" xlink:href="mailto:nobody@nowhere.net" office:name=""><text:span text:style-name="Definition">nobody@nowhere.net</text:span></text:a></text:p>
<text:p text:style-name="P56">Blockquoted:
<text:a xlink:type="simple" xlink:href="http://example.com/" office:name=""><text:span text:style-name="Definition"><text:span text:style-name="Teletype">http://example.com/</text:span></text:span></text:a></text:p>
<text:a xlink:type="simple" xlink:href="http://example.com/" office:name=""><text:span text:style-name="Definition">http://example.com/</text:span></text:a></text:p>
<text:p text:style-name="First_20_paragraph">Auto-links should not occur here:
<text:span text:style-name="Teletype">&lt;http://example.com/&gt;</text:span></text:p>
<text:p text:style-name="P57">or here: &lt;http://example.com/&gt;</text:p>

View file

@ -711,7 +711,7 @@ With an ampersand: [[http://example.com/?foo=1&bar=2]]
- [[http://example.com/]]
- It should.
An e-mail address: [[mailto:nobody@nowhere.net][=nobody@nowhere.net=]]
An e-mail address: [[mailto:nobody@nowhere.net][nobody@nowhere.net]]
#+BEGIN_QUOTE
Blockquoted: [[http://example.com/]]

View file

@ -407,21 +407,21 @@ inline link in pointy braces
.\par}
{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs32 Autolinks\par}
{\pard \ql \f0 \sa180 \li0 \fi0 With an ampersand: {\field{\*\fldinst{HYPERLINK "http://example.com/?foo=1&bar=2"}}{\fldrslt{\ul
{\f1 http://example.com/?foo=1&bar=2}
http://example.com/?foo=1&bar=2
}}}
\par}
{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab In a list?\par}
{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab {\field{\*\fldinst{HYPERLINK "http://example.com/"}}{\fldrslt{\ul
{\f1 http://example.com/}
http://example.com/
}}}
\par}
{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab It should.\sa180\par}
{\pard \ql \f0 \sa180 \li0 \fi0 An e-mail address: {\field{\*\fldinst{HYPERLINK "mailto:nobody@nowhere.net"}}{\fldrslt{\ul
{\f1 nobody@nowhere.net}
nobody@nowhere.net
}}}
\par}
{\pard \ql \f0 \sa180 \li720 \fi0 Blockquoted: {\field{\*\fldinst{HYPERLINK "http://example.com/"}}{\fldrslt{\ul
{\f1 http://example.com/}
http://example.com/
}}}
\par}
{\pard \ql \f0 \sa180 \li0 \fi0 Auto-links should not occur here: {\f1 <http://example.com/>}\par}

View file

@ -978,7 +978,7 @@ In a list?
It should.
@end itemize
An e-mail address: @uref{mailto:nobody@@nowhere.net,@code{nobody@@nowhere.net}}
An e-mail address: @uref{mailto:nobody@@nowhere.net,nobody@@nowhere.net}
@quotation
Blockquoted: @url{http://example.com/}

View file

@ -656,7 +656,7 @@ With an ampersand: "$":http://example.com/?foo=1&bar=2
* "$":http://example.com/
* It should.
An e-mail address: "<tt>nobody@nowhere.net</tt>":mailto:nobody@nowhere.net
An e-mail address: "nobody&#64;nowhere.net":mailto:nobody@nowhere.net
bq. Blockquoted: "$":http://example.com/