From c4b93bc3e7ea2006dbe3273ed06b66129775982e Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sun, 20 Jan 2013 20:23:50 -0800 Subject: 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. --- src/Text/Pandoc/Parsing.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Text') 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 -- cgit v1.2.3