Parsing.uri: don't treat * characters at end as part of URI.

This fixes #4561, a bug parsing emphasized bare links in RST.
This commit is contained in:
John MacFarlane
2018-04-19 11:49:17 -07:00
parent b15f4f468d
commit c76565bef5
+1 -1
View File
@@ -593,7 +593,7 @@ uri = try $ do
-- http://en.wikipedia.org/wiki/State_of_emergency_(disambiguation)
-- as a URL, while NOT picking up the closing paren in
-- (http://wikipedia.org). So we include balanced parens in the URL.
let isWordChar c = isAlphaNum c || c `elem` "#$%*+/@\\_-&="
let isWordChar c = isAlphaNum c || c `elem` "#$%+/@\\_-&="
let wordChar = satisfy isWordChar
let percentEscaped = try $ char '%' >> skipMany1 (satisfy isHexDigit)
let entity = () <$ characterReference