git.iko.soy/typeable/pandoc
on master help sign in
Mediawiki: Fixed regression for `<ref>URL</ref>`.
099b4b7John MacFarlane
src/Text/Pandoc/Parsing.hs+1−1
@@ -430,7 +430,7 @@ uri = try $ do
430 let percentEscaped = try $ char '%' >> skipMany1 (satisfy isHexDigit)
430 let percentEscaped = try $ char '%' >> skipMany1 (satisfy isHexDigit)
431 let entity = () <$ characterReference
431 let entity = () <$ characterReference
432 let punct = skipMany1 (char ',')
432 let punct = skipMany1 (char ',')
433− <|> () <$ (satisfy (not . isSpace))
433+ <|> () <$ (satisfy (\c -> not (isSpace c) && c /= '<'))
434 let uriChunk = skipMany1 wordChar
434 let uriChunk = skipMany1 wordChar
435 <|> percentEscaped
435 <|> percentEscaped
436 <|> entity
436 <|> entity
tests/mediawiki-reader.native+2−1
@@ -242,4 +242,5 @@ Pandoc (Meta {docTitle = [], docAuthors = [], docDate = []})
242 [[[Para [Str "Orange"]]]]
242 [[[Para [Str "Orange"]]]]
243,Para [Str "Paragraph",Space,Str "after",Space,Str "the",Space,Str "table."]
243,Para [Str "Paragraph",Space,Str "after",Space,Str "the",Space,Str "table."]
244,Header 2 ("",[],[]) [Str "notes"]
244,Header 2 ("",[],[]) [Str "notes"]
245−,Para [Str "My",Space,Str "note!",Note [Plain [Str "This."]]]]
245+,Para [Str "My",Space,Str "note!",Note [Plain [Str "This."]]]
246+,Para [Str "URL",Space,Str "note.",Note [Plain [Link [Str "http://docs.python.org/library/functions.html#range"] ("http://docs.python.org/library/functions.html#range","")]]]]
tests/mediawiki-reader.wiki+1
@@ -370,3 +370,4 @@ and cheese
370
370
371My note!<ref>This.</ref>
371My note!<ref>This.</ref>
372
372
373+URL note.<ref>http://docs.python.org/library/functions.html#range</ref>