aboutsummaryrefslogtreecommitdiff
path: root/Text/Pandoc/Readers
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-12-21 22:31:20 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-12-21 22:31:20 +0000
commitfbecb49790311480ff5e830052bf17c732ff8eab (patch)
tree65830b87cb65a820f1db03d37b0255cc07202fa2 /Text/Pandoc/Readers
parent48f2cc5600bd26c60ffa1d5531ba2d9aeead129d (diff)
downloadpandoc-fbecb49790311480ff5e830052bf17c732ff8eab.tar.gz
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
Diffstat (limited to 'Text/Pandoc/Readers')
-rw-r--r--Text/Pandoc/Readers/Markdown.hs7
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 ')'