aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2016-08-06 23:15:33 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2016-08-06 23:22:03 +0200
commit3a494392028daff84fecb6dddc2fd9535faf91b2 (patch)
treef6822a3931f5e03e2b63c92a111856f053591891 /src/Text/Pandoc/Readers
parentbe4783109c862f3251802c17bb204eed3166588a (diff)
downloadpandoc-3a494392028daff84fecb6dddc2fd9535faf91b2.tar.gz
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).
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r--src/Text/Pandoc/Readers/MediaWiki.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/MediaWiki.hs b/src/Text/Pandoc/Readers/MediaWiki.hs
index d3cee08e2..4e4bc3fb0 100644
--- a/src/Text/Pandoc/Readers/MediaWiki.hs
+++ b/src/Text/Pandoc/Readers/MediaWiki.hs
@@ -253,7 +253,7 @@ parseAttr = try $ do
k <- many1 letter
char '='
v <- (char '"' >> many1Till (satisfy (/='\n')) (char '"'))
- <|> many1 nonspaceChar
+ <|> many1 (satisfy $ \c -> not (isSpace c) && c /= '|')
return (k,v)
tableStart :: MWParser ()