git.iko.soy/typeable/pandoc
on master help sign in
MediaWiki reader: Ignore attributes on headers.
ca09c1aJohn MacFarlane
src/Text/Pandoc/Readers/MediaWiki.hs+3−4
@@ -229,7 +229,7 @@ tableEnd = try $ guardColumnOne *> skipSpaces *> sym "|}"
229
229
230rowsep :: MWParser ()
230rowsep :: MWParser ()
231rowsep = try $ guardColumnOne *> skipSpaces *> sym "|-" <*
231rowsep = try $ guardColumnOne *> skipSpaces *> sym "|-" <*
232− optional (void parseAttr) <* blanklines
232+ optional parseAttr <* blanklines
233
233
234cellsep :: MWParser ()
234cellsep :: MWParser ()
235cellsep = try $
235cellsep = try $
@@ -246,9 +246,8 @@ tableCaption = try $ do
246 guardColumnOne
246 guardColumnOne
247 skipSpaces
247 skipSpaces
248 sym "|+"
248 sym "|+"
249− skipMany spaceChar
249+ optional (try $ parseAttr *> skipSpaces *> char '|' *> skipSpaces)
250− res <- anyLine >>= parseFromString (many inline)
250+ (trimInlines . mconcat) <$> many (notFollowedBy (cellsep <|> rowsep) *> inline)
251− return $ trimInlines $ mconcat res
252
251
253tableRow :: MWParser [((Alignment, Double), Blocks)]
252tableRow :: MWParser [((Alignment, Double), Blocks)]
254tableRow = try $ many tableCell
253tableRow = try $ many tableCell