MediaWiki reader: Parse styles on table cells.

This commit is contained in:
John MacFarlane 2012-09-15 01:13:26 -04:00
parent 9a54a949c7
commit a2391b0395

View file

@ -30,6 +30,8 @@ Conversion of mediawiki text to 'Pandoc' document.
-}
{-
TODO:
_ tables - cell alignment and width
_ calculate cell widths when not given??? see html? latex? reader
_ support tables http://www.mediawiki.org/wiki/Help:Tables
- footnotes?
-}
@ -225,6 +227,10 @@ tableCell :: MWParser Blocks
tableCell = try $ do
cellsep
skipMany spaceChar
attrs <- (parseAttrs <$>
manyTill (satisfy (/='\n'))
(try $ char '|' <* notFollowedBy (char '|')))
skipMany spaceChar
ls <- many (notFollowedBy (cellsep <|> rowsep <|> tableEnd) *> anyChar)
parseFromString (mconcat <$> many block) ls