git.iko.soy/typeable/pandoc
on master help sign in
Modified 'source' parser in Markdown reader to allow backslash escapes in URLs.
fbecb49fiddlosopher
Text/Pandoc/Readers/Markdown.hs+4−3
@@ -818,9 +818,10 @@ reference = notFollowedBy' (string "[^") >> -- footnote reference
818-- source for a link, with optional title
818-- source for a link, with optional title
819source = try $ do
819source = try $ do
820 char '('
820 char '('
821− optional (char '<')
821+ src <- try (char '<' >>
822− src <- many (noneOf ")> \t\n")
822+ many ((char '\\' >> anyChar) <|> noneOf "> \t\n") >>~
823− optional (char '>')
823+ char '>')
824+ <|> many ((char '\\' >> anyChar) <|> noneOf ") \t\n")
824 tit <- option "" linkTitle
825 tit <- option "" linkTitle
825 skipSpaces
826 skipSpaces
826 char ')'
827 char ')'