git.iko.soy/typeable/pandoc
on master help sign in
MediaWiki reader: Handle table rows containing just an HTML comment.

Closes #1230.

commitca40acea5b022d6309a36000d54844a482c14555 authorJohn MacFarlane <jgm@berkeley.edu> dateThu 10 Apr 2014, 16:52 (13 years ago) parentf48b564
1 file changed+2−1
src/Text/Pandoc/Readers/MediaWiki.hs+2−1
src/Text/Pandoc/Readers/MediaWiki.hs+2−1
@@ -227,6 +227,7 @@ table = do
227227 let widths' = map (\w -> if w == 0 then defaultwidth else w) widths
228228 let cellspecs = zip (map fst cellspecs') widths'
229229 rows' <- many $ try $ rowsep *> (map snd <$> tableRow)
230+ optional blanklines
230231 tableEnd
231232 let cols = length hdr
232233 let (headers,rows) = if hasheader
@@ -275,7 +276,7 @@ tableCaption = try $ do
275276 (trimInlines . mconcat) <$> many (notFollowedBy (cellsep <|> rowsep) *> inline)
276277
277278tableRow :: MWParser [((Alignment, Double), Blocks)]
278−tableRow = try $ many tableCell
279+tableRow = try $ skipMany htmlComment *> many tableCell
279280
280281tableCell :: MWParser ((Alignment, Double), Blocks)
281282tableCell = try $ do