MediaWiki reader: Parse styles on table cells.
This commit is contained in:
parent
9a54a949c7
commit
a2391b0395
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue