From 422bba202ef6731f0487880f08200f5dc9d6bbb0 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 24 Jan 2011 22:25:17 -0800 Subject: RST reader: Include line breaks in raw field list parser output. Note: field list items can have lists, etc. as values. --- src/Text/Pandoc/Readers/RST.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/Text') diff --git a/src/Text/Pandoc/Readers/RST.hs b/src/Text/Pandoc/Readers/RST.hs index fee932f2b..371cbc0f3 100644 --- a/src/Text/Pandoc/Readers/RST.hs +++ b/src/Text/Pandoc/Readers/RST.hs @@ -152,7 +152,9 @@ fieldListItem indent = try $ do first <- manyTill anyChar newline rest <- option "" $ try $ lookAhead (string indent >> spaceChar) >> indentedBlock - return (name, intercalate " " (first:(lines rest))) + return (name, first ++ if null rest + then "" + else ("\n" ++ rest)) fieldList :: GenParser Char ParserState Block fieldList = try $ do -- cgit v1.2.3