aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-04-10 16:52:30 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2014-04-10 16:52:30 -0700
commitca40acea5b022d6309a36000d54844a482c14555 (patch)
tree59cc111e26e117aef09fc160e209048630799a92
parentf48b564ac76ac4c2d2f05dc4673ba4b0e0fabdfa (diff)
downloadpandoc-ca40acea5b022d6309a36000d54844a482c14555.tar.gz
MediaWiki reader: Handle table rows containing just an HTML comment.
Closes #1230.
-rw-r--r--src/Text/Pandoc/Readers/MediaWiki.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/MediaWiki.hs b/src/Text/Pandoc/Readers/MediaWiki.hs
index 9bbabd44b..feaedb7c2 100644
--- a/src/Text/Pandoc/Readers/MediaWiki.hs
+++ b/src/Text/Pandoc/Readers/MediaWiki.hs
@@ -227,6 +227,7 @@ table = do
let widths' = map (\w -> if w == 0 then defaultwidth else w) widths
let cellspecs = zip (map fst cellspecs') widths'
rows' <- many $ try $ rowsep *> (map snd <$> tableRow)
+ optional blanklines
tableEnd
let cols = length hdr
let (headers,rows) = if hasheader
@@ -275,7 +276,7 @@ tableCaption = try $ do
(trimInlines . mconcat) <$> many (notFollowedBy (cellsep <|> rowsep) *> inline)
tableRow :: MWParser [((Alignment, Double), Blocks)]
-tableRow = try $ many tableCell
+tableRow = try $ skipMany htmlComment *> many tableCell
tableCell :: MWParser ((Alignment, Double), Blocks)
tableCell = try $ do