aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2022-01-08 21:22:21 -0800
committerJohn MacFarlane <[email protected]>2022-01-08 21:22:21 -0800
commit8736fe11eedaacfc5794696b834d6018947681db (patch)
treed1325c35dbbb3d8902bc2b8955d6d9e4ae1f1df3 /src
parent252211bd275e34e64c77d260348cedaa17ba4667 (diff)
Org writer: fix extra blank line inserted after empty list item.
Addresses issue 2 from #7810.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Writers/Org.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/Org.hs b/src/Text/Pandoc/Writers/Org.hs
index 0cf33f5b6..d6f3d6e37 100644
--- a/src/Text/Pandoc/Writers/Org.hs
+++ b/src/Text/Pandoc/Writers/Org.hs
@@ -220,7 +220,7 @@ bulletListItemToOrg items = do
exts <- gets $ writerExtensions . stOptions
contents <- blockListToOrg (taskListItemToOrg exts items)
return $ hang 2 "- " contents $$
- if endsWithPlain items
+ if null items || endsWithPlain items
then cr
else blankline
@@ -238,7 +238,7 @@ orderedListItemToOrg marker counter items = do
counter
return $ hang (T.length marker + 1)
(literal marker <> cookie <> space) contents $$
- if endsWithPlain items
+ if null items || endsWithPlain items
then cr
else blankline