From 47566817c559557f5bc6c9c503afa1a37bf7df90 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 28 Oct 2019 21:14:01 -0700 Subject: Shared: improve isTight. If a list has an empty item, this should not count against its being a tight list. Closes #5857. --- src/Text/Pandoc/Shared.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Text/Pandoc/Shared.hs') 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 -- cgit v1.2.3