Org writer: fix extra blank line inserted after empty list item.

Addresses issue 2 from #7810.
This commit is contained in:
John MacFarlane 2022-01-08 21:22:21 -08:00
parent 252211bd27
commit 8736fe11ee

View file

@ -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