MediaWiki reader: Ignore attributes on headers.
This commit is contained in:
parent
c63e490ab2
commit
ca09c1ac3b
1 changed files with 3 additions and 4 deletions
|
@ -229,7 +229,7 @@ tableEnd = try $ guardColumnOne *> skipSpaces *> sym "|}"
|
||||||
|
|
||||||
rowsep :: MWParser ()
|
rowsep :: MWParser ()
|
||||||
rowsep = try $ guardColumnOne *> skipSpaces *> sym "|-" <*
|
rowsep = try $ guardColumnOne *> skipSpaces *> sym "|-" <*
|
||||||
optional (void parseAttr) <* blanklines
|
optional parseAttr <* blanklines
|
||||||
|
|
||||||
cellsep :: MWParser ()
|
cellsep :: MWParser ()
|
||||||
cellsep = try $
|
cellsep = try $
|
||||||
|
@ -246,9 +246,8 @@ tableCaption = try $ do
|
||||||
guardColumnOne
|
guardColumnOne
|
||||||
skipSpaces
|
skipSpaces
|
||||||
sym "|+"
|
sym "|+"
|
||||||
skipMany spaceChar
|
optional (try $ parseAttr *> skipSpaces *> char '|' *> skipSpaces)
|
||||||
res <- anyLine >>= parseFromString (many inline)
|
(trimInlines . mconcat) <$> many (notFollowedBy (cellsep <|> rowsep) *> inline)
|
||||||
return $ trimInlines $ mconcat res
|
|
||||||
|
|
||||||
tableRow :: MWParser [((Alignment, Double), Blocks)]
|
tableRow :: MWParser [((Alignment, Double), Blocks)]
|
||||||
tableRow = try $ many tableCell
|
tableRow = try $ many tableCell
|
||||||
|
|
Loading…
Reference in a new issue