Muse writer: don't indent nested definition lists

This commit is contained in:
Alexander Krotov 2018-02-23 22:07:30 +03:00
parent 788cb6e9a1
commit 8f8f0f8a60
2 changed files with 5 additions and 3 deletions

View file

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

View file

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