MediaWiki reader: Ignore attributes on headers.

This commit is contained in:
John MacFarlane 2013-05-20 11:08:27 -07:00
parent c63e490ab2
commit ca09c1ac3b

View file

@ -229,7 +229,7 @@ tableEnd = try $ guardColumnOne *> skipSpaces *> sym "|}"
rowsep :: MWParser ()
rowsep = try $ guardColumnOne *> skipSpaces *> sym "|-" <*
optional (void parseAttr) <* blanklines
optional parseAttr <* blanklines
cellsep :: MWParser ()
cellsep = try $
@ -246,9 +246,8 @@ tableCaption = try $ do
guardColumnOne
skipSpaces
sym "|+"
skipMany spaceChar
res <- anyLine >>= parseFromString (many inline)
return $ trimInlines $ mconcat res
optional (try $ parseAttr *> skipSpaces *> char '|' *> skipSpaces)
(trimInlines . mconcat) <$> many (notFollowedBy (cellsep <|> rowsep) *> inline)
tableRow :: MWParser [((Alignment, Double), Blocks)]
tableRow = try $ many tableCell