aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-11-25 12:24:33 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2014-11-25 12:24:33 -0800
commit25e2c42347b9bf71b765984d3d897fae8b1a2edb (patch)
treef591328610e3fd3bafe3af444aa31efae24ddced /src/Text/Pandoc
parentdc92a628833a3bf8f528c480fac80d926f63f9b6 (diff)
downloadpandoc-25e2c42347b9bf71b765984d3d897fae8b1a2edb.tar.gz
RST writer: Omit blank lines after list items.
They are optional in RST (except after the last list item, of course). Fixes #1777.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Writers/RST.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Writers/RST.hs b/src/Text/Pandoc/Writers/RST.hs
index 40d6fdf18..85d395f52 100644
--- a/src/Text/Pandoc/Writers/RST.hs
+++ b/src/Text/Pandoc/Writers/RST.hs
@@ -274,7 +274,7 @@ blockToRST (DefinitionList items) = do
bulletListItemToRST :: [Block] -> State WriterState Doc
bulletListItemToRST items = do
contents <- blockListToRST items
- return $ hang 3 "- " $ contents <> cr
+ return $ hang 3 "- " contents
-- | Convert ordered list item (a list of blocks) to RST.
orderedListItemToRST :: String -- ^ marker for list item
@@ -283,7 +283,7 @@ orderedListItemToRST :: String -- ^ marker for list item
orderedListItemToRST marker items = do
contents <- blockListToRST items
let marker' = marker ++ " "
- return $ hang (length marker') (text marker') $ contents <> cr
+ return $ hang (length marker') (text marker') contents
-- | Convert defintion list item (label, list of blocks) to RST.
definitionListItemToRST :: ([Inline], [[Block]]) -> State WriterState Doc
@@ -291,7 +291,7 @@ definitionListItemToRST (label, defs) = do
label' <- inlineListToRST label
contents <- liftM vcat $ mapM blockListToRST defs
tabstop <- get >>= (return . writerTabStop . stOptions)
- return $ label' $$ nest tabstop (nestle contents <> cr)
+ return $ label' $$ nest tabstop (nestle contents)
-- | Convert list of Pandoc block elements to RST.
blockListToRST :: [Block] -- ^ List of block elements