git.iko.soy/typeable/pandoc
on master help sign in
RST reader: Include line breaks in raw field list parser output.

Note: field list items can have lists, etc. as values.

commit422bba202ef6731f0487880f08200f5dc9d6bbb0 authorJohn MacFarlane <jgm@berkeley.edu> dateMon 24 Jan 2011, 22:25 (16 years ago) parente66cc67
1 file changed+3−1
src/Text/Pandoc/Readers/RST.hs+3−1
src/Text/Pandoc/Readers/RST.hs+3−1
@@ -152,7 +152,9 @@ fieldListItem indent = try $ do
152152 first <- manyTill anyChar newline
153153 rest <- option "" $ try $ lookAhead (string indent >> spaceChar) >>
154154 indentedBlock
155− return (name, intercalate " " (first:(lines rest)))
155+ return (name, first ++ if null rest
156+ then ""
157+ else ("\n" ++ rest))
156158
157159fieldList :: GenParser Char ParserState Block
158160fieldList = try $ do