Fix for unquoted attribute values in mediawiki tables.
Previously an unquoted attribute value in a table row
could cause parsing problems.
Fixes #3053 (well, proper rowspans and colspans aren't
created, but that's a bigger limitation with the current
Pandoc document model for tables).
commit3a494392028daff84fecb6dddc2fd9535faf91b2
authorJohn MacFarlane <jgm@berkeley.edu>
dateSat 6 Aug 2016, 23:15 (10 years ago)
parentbe47831
src/Text/Pandoc/Readers/MediaWiki.hs+1−1
@@ -253,7 +253,7 @@ parseAttr = try $ do
253253 k <- many1 letter
254254 char '='
255255 v <- (char '"' >> many1Till (satisfy (/='\n')) (char '"'))
256− <|> many1 nonspaceChar
256+ <|> many1 (satisfy $ \c -> not (isSpace c) && c /= '|')
257257 return (k,v)
258258
259259tableStart :: MWParser ()