summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2013-01-20 20:23:50 -0800
committerJohn MacFarlane <fiddlosopher@gmail.com>2013-01-20 20:23:50 -0800
commitc4b93bc3e7ea2006dbe3273ed06b66129775982e (patch)
treec12d51bf702345fadd06976714cdbb3c553394c7
parent65528e48f8c7bd96e97b09e07a192a877acd173c (diff)
Fixed bug in uri parser.
The bug prevented an autolink at the end of a string (e.g. at the end of a line block line) from counting as a link. Closes #711.
-rw-r--r--src/Text/Pandoc/Parsing.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Parsing.hs b/src/Text/Pandoc/Parsing.hs
index 26e8c2325..2a5780f8f 100644
--- a/src/Text/Pandoc/Parsing.hs
+++ b/src/Text/Pandoc/Parsing.hs
@@ -415,7 +415,7 @@ uri = try $ do
let uriChunk = skipMany1 wordChar
<|> percentEscaped
<|> entity
- <|> (try $ punct >> notFollowedBy (satisfy $ not . isWordChar))
+ <|> (try $ punct >> lookAhead (satisfy isWordChar) >> return ())
str <- snd `fmap` withRaw (skipMany1 ( () <$
(enclosed (char '(') (char ')') uriChunk
<|> enclosed (char '{') (char '}') uriChunk