aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Shared.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2019-10-28 21:14:01 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2019-10-28 21:14:01 -0700
commit47566817c559557f5bc6c9c503afa1a37bf7df90 (patch)
tree430027938b0e21c53a115ce449aae755f6a319a6 /src/Text/Pandoc/Shared.hs
parent57e2148ca2b9604b35cfceacbd89487d6f5f8aab (diff)
downloadpandoc-47566817c559557f5bc6c9c503afa1a37bf7df90.tar.gz
Shared: improve isTight.
If a list has an empty item, this should not count against its being a tight list. Closes #5857.
Diffstat (limited to 'src/Text/Pandoc/Shared.hs')
-rw-r--r--src/Text/Pandoc/Shared.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Shared.hs b/src/Text/Pandoc/Shared.hs
index c5183aacb..59e30feeb 100644
--- a/src/Text/Pandoc/Shared.hs
+++ b/src/Text/Pandoc/Shared.hs
@@ -623,7 +623,7 @@ onlySimpleTableCells = all isSimpleCell . concat
-- | Detect if a list is tight.
isTightList :: [[Block]] -> Bool
-isTightList = all firstIsPlain
+isTightList = all (\item -> firstIsPlain item || null item)
where firstIsPlain (Plain _ : _) = True
firstIsPlain _ = False