git.iko.soy/typeable/pandoc
on master help sign in
Text.Pandoc.Parsing.uri: allow `&` and `=` as word characters.
508aab0John MacFarlane
src/Text/Pandoc/Parsing.hs+1−1
@@ -563,7 +563,7 @@ uri = try $ do
563 -- http://en.wikipedia.org/wiki/State_of_emergency_(disambiguation)
563 -- http://en.wikipedia.org/wiki/State_of_emergency_(disambiguation)
564 -- as a URL, while NOT picking up the closing paren in
564 -- as a URL, while NOT picking up the closing paren in
565 -- (http://wikipedia.org). So we include balanced parens in the URL.
565 -- (http://wikipedia.org). So we include balanced parens in the URL.
566− let isWordChar c = isAlphaNum c || c `elem` "#$%*+/@\\_-"
566+ let isWordChar c = isAlphaNum c || c `elem` "#$%*+/@\\_-&="
567 let wordChar = satisfy isWordChar
567 let wordChar = satisfy isWordChar
568 let percentEscaped = try $ char '%' >> skipMany1 (satisfy isHexDigit)
568 let percentEscaped = try $ char '%' >> skipMany1 (satisfy isHexDigit)
569 let entity = () <$ characterReference
569 let entity = () <$ characterReference
test/command/4068.mdnew file+9
@@ -0,0 +1,9 @@
1+```
2+pandoc -f mediawiki -t native
3+[https://domain.com/script.php?a=1&b=2&c=&d=4 open productname bugs]
4+
5+[http://domain.com?a=. open productname bugs]
6+^D
7+[Para [Link ("",[],[]) [Str "open",Space,Str "productname",Space,Str "bugs"] ("https://domain.com/script.php?a=1&b=2&c=&d=4","")]
8+,Para [Str "[",Link ("",[],[]) [Str "http://domain.com?a="] ("http://domain.com?a=",""),Str ".",Space,Str "open",Space,Str "productname",Space,Str "bugs]"]]
9+```