diff options
author | John MacFarlane <jgm@berkeley.edu> | 2011-04-11 14:45:42 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2011-04-11 14:45:42 -0700 |
commit | 4b90ffe1bd481c9330ffdad455676df6fe2fa6d4 (patch) | |
tree | 39de4690f95cdf79e1e04844f926fb581786811f /src/Text/Pandoc | |
parent | 6b282fda5b4dab7c725ca64c1935d87d743b95ee (diff) | |
download | pandoc-4b90ffe1bd481c9330ffdad455676df6fe2fa6d4.tar.gz |
Allow '|' followed by newline in RST line block.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Readers/RST.hs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/RST.hs b/src/Text/Pandoc/Readers/RST.hs index 736219d68..04bb33023 100644 --- a/src/Text/Pandoc/Readers/RST.hs +++ b/src/Text/Pandoc/Readers/RST.hs @@ -198,11 +198,14 @@ fieldList = try $ do lineBlockLine :: GenParser Char ParserState [Inline] lineBlockLine = try $ do - string "| " + char '|' + char ' ' <|> lookAhead (char '\n') white <- many spaceChar line <- many $ (notFollowedBy newline >> inline) <|> (try $ endline >>~ char ' ') optional endline - return $ normalizeSpaces $ (if null white then [] else [Str white]) ++ line + return $ if null white + then normalizeSpaces line + else Str white : normalizeSpaces line lineBlock :: GenParser Char ParserState Block lineBlock = try $ do |