aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers
diff options
context:
space:
mode:
authorAlexander Krotov <ilabdsf@gmail.com>2018-02-23 22:07:30 +0300
committerAlexander Krotov <ilabdsf@gmail.com>2018-02-23 22:07:53 +0300
commit8f8f0f8a603a75ea56068f65ef6e13c2c66a8402 (patch)
tree4cf257649c37c50ce22a3894267d5953ca5fc624 /src/Text/Pandoc/Writers
parent788cb6e9a19d575666436197e77e8e17679753ed (diff)
downloadpandoc-8f8f0f8a603a75ea56068f65ef6e13c2c66a8402.tar.gz
Muse writer: don't indent nested definition lists
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r--src/Text/Pandoc/Writers/Muse.hs4
1 files changed, 3 insertions, 1 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