diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2013-01-06 20:51:51 -0800 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2013-01-06 20:51:51 -0800 |
commit | 8c48bd8feb97e6c291df2e0ca09f62fb34711d33 (patch) | |
tree | 80821e64776ea6ed605f6134e53a2a93feda3e6c /src/Text/Pandoc/Readers | |
parent | 300f8528daaa13b6ee6931bbe8bb70eac914b333 (diff) | |
download | pandoc-8c48bd8feb97e6c291df2e0ca09f62fb34711d33.tar.gz |
Don't put the text of an autolink in Code font.
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r-- | src/Text/Pandoc/Readers/DocBook.hs | 6 | ||||
-rw-r--r-- | src/Text/Pandoc/Readers/LaTeX.hs | 2 | ||||
-rw-r--r-- | src/Text/Pandoc/Readers/Markdown.hs | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/Text/Pandoc/Readers/DocBook.hs b/src/Text/Pandoc/Readers/DocBook.hs index 8e4c8e9d4..0058e889c 100644 --- a/src/Text/Pandoc/Readers/DocBook.hs +++ b/src/Text/Pandoc/Readers/DocBook.hs @@ -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 diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs index 8848be028..5362b1b53 100644 --- a/src/Text/Pandoc/Readers/LaTeX.hs +++ b/src/Text/Pandoc/Readers/LaTeX.hs @@ -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)) diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index 985d1d0f2..8c4855076 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -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 |