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