aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Readers/RST.hs4
1 files changed, 3 insertions, 1 deletions
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