diff options
-rw-r--r-- | src/Text/Pandoc/Shared.hs | 2 | ||||
-rw-r--r-- | test/command/5857.md | 11 |
2 files changed, 12 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 diff --git a/test/command/5857.md b/test/command/5857.md new file mode 100644 index 000000000..31320cd12 --- /dev/null +++ b/test/command/5857.md @@ -0,0 +1,11 @@ +``` +% pandoc -f native -t markdown +[BulletList + [[Plain [Str "a"]] + ,[] + ,[Plain [Str "b"]]]] +^D +- a +- +- b +``` |