diff options
-rw-r--r-- | src/Text/Pandoc/Writers/Muse.hs | 4 | ||||
-rw-r--r-- | test/Tests/Writers/Muse.hs | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Writers/Muse.hs b/src/Text/Pandoc/Writers/Muse.hs index 7f53e202d..b4eb19ef6 100644 --- a/src/Text/Pandoc/Writers/Muse.hs +++ b/src/Text/Pandoc/Writers/Muse.hs @@ -207,7 +207,9 @@ blockToMuse (BulletList items) = do return $ hang 2 "- " contents blockToMuse (DefinitionList items) = do contents <- mapM definitionListItemToMuse items - return $ cr $$ nest 1 (vcat contents) $$ blankline + -- ensure that sublists have preceding blank line + topLevel <- gets stTopLevel + return $ cr $$ (if topLevel then nest 1 else id) (vcat contents) $$ blankline where definitionListItemToMuse :: PandocMonad m => ([Inline], [[Block]]) -> StateT WriterState m Doc diff --git a/test/Tests/Writers/Muse.hs b/test/Tests/Writers/Muse.hs index 13c457a37..7aee36217 100644 --- a/test/Tests/Writers/Muse.hs +++ b/test/Tests/Writers/Muse.hs @@ -217,8 +217,8 @@ tests = [ testGroup "block elements" ] =?> unlines [ " first definition :: first description" , " second definition :: second description" - , " first inner definition :: first inner description" - , " second inner definition :: second inner description" + , " first inner definition :: first inner description" + , " second inner definition :: second inner description" ] ] -- Check that list is intended with one space even inside a quote |