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.
This commit is contained in:
John MacFarlane 2013-01-20 20:23:50 -08:00
parent 65528e48f8
commit c4b93bc3e7

View file

@ -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