From 78e4fbda51a243f96176be001af8e538fcbc33c8 Mon Sep 17 00:00:00 2001 From: Daniele D'Orazio Date: Wed, 26 Oct 2016 12:18:58 +0200 Subject: Markdown Reader: add attributes for autolink (#3183) --- src/Text/Pandoc/Readers/Markdown.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/Text') diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index 2337b733a..f020e1bee 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -1828,7 +1828,9 @@ autoLink = try $ do -- final punctuation. for example: in ``, -- the URI parser will stop before the dashes. extra <- fromEntities <$> manyTill nonspaceChar (char '>') - return $ return $ B.link (src ++ escapeURI extra) "" (B.str $ orig ++ extra) + attr <- option nullAttr $ try $ + guardEnabled Ext_link_attributes >> attributes + return $ return $ B.linkWith attr (src ++ escapeURI extra) "" (B.str $ orig ++ extra) image :: MarkdownParser (F Inlines) image = try $ do -- cgit v1.2.3