@@ -610,8 +610,19 @@ definitionListItemToMarkdown opts (label, defs) = do
610610 let sps = case writerTabStop opts - 3 of
611611 n | n > 0 -> text $ replicate n ' '
612612 _ -> text " "
613− let contents = vcat $ map (\d -> hang tabStop (leader <> sps) $ vcat d <> cr) defs'
614− return $ nowrap labelText <> cr <> contents <> cr
613+ if isEnabled Ext_compact_definition_lists opts
614+ then do
615+ let contents = vcat $ map (\d -> hang tabStop (leader <> sps)
616+ $ vcat d <> cr) defs'
617+ return $ nowrap labelText <> cr <> contents <> cr
618+ else do
619+ let contents = vcat $ map (\d -> hang tabStop (leader <> sps)
620+ $ vcat d <> cr) defs'
621+ let isTight = case defs of
622+ ((Plain _ : _): _) -> True
623+ _ -> False
624+ return $ blankline <> nowrap labelText <>
625+ (if isTight then cr else blankline) <> contents <> blankline
615626 else do
616627 return $ nowrap labelText <> text " " <> cr <>
617628 vsep (map vsep defs') <> blankline