aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2013-03-27 08:45:51 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2013-03-27 08:45:51 -0700
commit351b3e09c3a7b03240aab530a33b3126f80ffd48 (patch)
tree9140d1318a898fd8f2bc4b2d24c6a82b51d37a65 /src/Text/Pandoc/Readers
parentba1e74dcd7a3db8af3653f59416fc2740730b320 (diff)
downloadpandoc-351b3e09c3a7b03240aab530a33b3126f80ffd48.tar.gz
mediawiki reader: allow space before table rows.
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r--src/Text/Pandoc/Readers/MediaWiki.hs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Readers/MediaWiki.hs b/src/Text/Pandoc/Readers/MediaWiki.hs
index cb9eee47d..31d14117b 100644
--- a/src/Text/Pandoc/Readers/MediaWiki.hs
+++ b/src/Text/Pandoc/Readers/MediaWiki.hs
@@ -219,17 +219,17 @@ parseAttr = try $ do
return (k,v)
tableStart :: MWParser ()
-tableStart = try $ guardColumnOne *> sym "{|"
+tableStart = try $ guardColumnOne *> skipSpaces *> sym "{|"
tableEnd :: MWParser ()
-tableEnd = try $ guardColumnOne *> sym "|}"
+tableEnd = try $ guardColumnOne *> skipSpaces *> sym "|}"
rowsep :: MWParser ()
-rowsep = try $ guardColumnOne *> sym "|-" <* blanklines
+rowsep = try $ guardColumnOne *> skipSpaces *> sym "|-" <* blanklines
cellsep :: MWParser ()
cellsep = try $
- (guardColumnOne <*
+ (guardColumnOne *> skipSpaces <*
( (char '|' <* notFollowedBy (oneOf "-}+"))
<|> (char '!')
)
@@ -240,6 +240,7 @@ cellsep = try $
tableCaption :: MWParser Inlines
tableCaption = try $ do
guardColumnOne
+ skipSpaces
sym "|+"
skipMany spaceChar
res <- anyLine >>= parseFromString (many inline)