diff options
author | John MacFarlane <jgm@berkeley.edu> | 2013-05-20 11:08:27 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2013-05-20 11:08:27 -0700 |
commit | ca09c1ac3b66d5f019dfb7d52496f75f8e45d0f3 (patch) | |
tree | eb40133e906ecfe2ba12e166f00e4b0c4e4c97f6 /src/Text/Pandoc/Readers | |
parent | c63e490ab2c33acf6ae06b6d8ef5043510a08a65 (diff) | |
download | pandoc-ca09c1ac3b66d5f019dfb7d52496f75f8e45d0f3.tar.gz |
MediaWiki reader: Ignore attributes on headers.
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r-- | src/Text/Pandoc/Readers/MediaWiki.hs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Readers/MediaWiki.hs b/src/Text/Pandoc/Readers/MediaWiki.hs index 2e8ad27e5..56049e035 100644 --- a/src/Text/Pandoc/Readers/MediaWiki.hs +++ b/src/Text/Pandoc/Readers/MediaWiki.hs @@ -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 |