diff options
Diffstat (limited to 'Text/Pandoc/Readers/Markdown.hs')
-rw-r--r-- | Text/Pandoc/Readers/Markdown.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Text/Pandoc/Readers/Markdown.hs b/Text/Pandoc/Readers/Markdown.hs index 9b927ccd7..2c0bf8db8 100644 --- a/Text/Pandoc/Readers/Markdown.hs +++ b/Text/Pandoc/Readers/Markdown.hs @@ -818,9 +818,10 @@ reference = notFollowedBy' (string "[^") >> -- footnote reference -- source for a link, with optional title source = try $ do char '(' - optional (char '<') - src <- many (noneOf ")> \t\n") - optional (char '>') + src <- try (char '<' >> + many ((char '\\' >> anyChar) <|> noneOf "> \t\n") >>~ + char '>') + <|> many ((char '\\' >> anyChar) <|> noneOf ") \t\n") tit <- option "" linkTitle skipSpaces char ')' |