@@ -555,7 +555,14 @@ bulletListItemToMarkdown opts items = do
555555 contents <- blockListToMarkdown opts items
556556 let sps = replicate (writerTabStop opts - 2) ' '
557557 let start = text ('-' : ' ' : sps)
558− return $ hang (writerTabStop opts) start $ contents <> cr
558+ -- remove trailing blank line if it is a tight list
559+ let contents' = case reverse items of
560+ (BulletList xs:_) | isTightList xs ->
561+ chomp contents <> cr
562+ (OrderedList _ xs:_) | isTightList xs ->
563+ chomp contents <> cr
564+ _ -> contents
565+ return $ hang (writerTabStop opts) start $ contents' <> cr
559566
560567-- | Convert ordered list item (a list of blocks) to markdown.
561568orderedListItemToMarkdown :: WriterOptions -- ^ options