aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Writers/RST.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/RST.hs b/src/Text/Pandoc/Writers/RST.hs
index d407368ca..549f0f369 100644
--- a/src/Text/Pandoc/Writers/RST.hs
+++ b/src/Text/Pandoc/Writers/RST.hs
@@ -365,7 +365,7 @@ bulletListItemToRST :: PandocMonad m => [Block] -> RST m (Doc Text)
bulletListItemToRST items = do
contents <- blockListToRST items
return $ hang 3 "- " contents $$
- if endsWithPlain items
+ if null items || endsWithPlain items
then cr
else blankline
@@ -378,7 +378,7 @@ orderedListItemToRST marker items = do
contents <- blockListToRST items
let marker' = marker <> " "
return $ hang (T.length marker') (literal marker') contents $$
- if endsWithPlain items
+ if null items || endsWithPlain items
then cr
else blankline