diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-07-28 02:12:40 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-07-28 02:12:40 +0000 |
commit | 9939b0f07ed871d091585b4820b309d087b4cb65 (patch) | |
tree | 7efb8238789f881d34fc0d485d4de07dfd73a0b5 /src/Text/Pandoc/Readers | |
parent | cf87eb854d1e64c673073c46e7b9544738bad95f (diff) | |
download | pandoc-9939b0f07ed871d091585b4820b309d087b4cb65.tar.gz |
Make URLs and emails in autolinks appear as Code.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@810 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r-- | src/Text/Pandoc/Readers/Markdown.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index ad3b015b4..3f4c76be4 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -972,7 +972,7 @@ autoLinkEmail = try $ do domain <- sepBy1 (many1 (noneOf "/:.@<> \t\n")) (char '.') let src = name ++ "@" ++ (joinWithSep "." domain) char '>' - return $ Link [Str src] (("mailto:" ++ src), "") + return $ Link [Code src] (("mailto:" ++ src), "") -- a link <http://like.this.com> autoLinkRegular = try $ do @@ -980,7 +980,7 @@ autoLinkRegular = try $ do prot <- oneOfStrings ["http:", "ftp:", "mailto:"] rest <- many1Till (noneOf " \t\n<>") (char '>') let src = prot ++ rest - return $ Link [Str src] (src, "") + return $ Link [Code src] (src, "") image = try (do char '!' |