git.iko.soy/typeable/pandoc
on master help sign in
Modified 'source' parser in Markdown reader to allow backslash escapes in URLs.

So, for example, [my](/url\(1\)) yields a link to /url(1). Resolves Issue #34. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1151 788f1e2b-df1e-0410-8736-df70ead52e1b

commitfbecb49790311480ff5e830052bf17c732ff8eab authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateFri 21 Dec 2007, 22:31 (19 years ago) parent48f2cc5
1 file changed+4−3
Text/Pandoc/Readers/Markdown.hs+4−3
Text/Pandoc/Readers/Markdown.hs+4−3
@@ -818,9 +818,10 @@ reference = notFollowedBy' (string "[^") >> -- footnote reference
818818-- source for a link, with optional title
819819source = try $ do
820820 char '('
821− optional (char '<')
822− src <- many (noneOf ")> \t\n")
823− optional (char '>')
821+ src <- try (char '<' >>
822+ many ((char '\\' >> anyChar) <|> noneOf "> \t\n") >>~
823+ char '>')
824+ <|> many ((char '\\' >> anyChar) <|> noneOf ") \t\n")
824825 tit <- option "" linkTitle
825826 skipSpaces
826827 char ')'