diff --git a/src/Text/Pandoc/Writers/ANSI.hs b/src/Text/Pandoc/Writers/ANSI.hs index 962560422c4f..92c8e0af84bb 100644 --- a/src/Text/Pandoc/Writers/ANSI.hs +++ b/src/Text/Pandoc/Writers/ANSI.hs @@ -124,7 +124,11 @@ blockToANSI opts (Plain inlines) = inlineListToANSI opts inlines blockToANSI opts (Para inlines) = inlineListToANSI opts inlines -blockToANSI opts (LineBlock lns) = blockToANSI opts $ linesToPara lns +blockToANSI opts (LineBlock lns) = do + let go [] = return D.blankline + go xs = inlineListToANSI opts xs + lns' <- mapM go lns + return $ D.vcat lns' blockToANSI _ b@(RawBlock _ _) = do report $ BlockNotRendered b diff --git a/test/ansi-test.ansi b/test/ansi-test.ansi index 691ed561d211..57147eacc700 100644 --- a/test/ansi-test.ansi +++ b/test/ansi-test.ansi @@ -113,6 +113,10 @@ small caps We see a log₁₀ reduction in 2⁹ seconds. +Hello + +Goodbye + ──────────────────── 1. Here’s the note.]8;;\ diff --git a/test/ansi-test.txt b/test/ansi-test.txt index a812629a7aef..4e6f9800cb90 100644 --- a/test/ansi-test.txt +++ b/test/ansi-test.txt @@ -121,3 +121,7 @@ More text. [small caps]{.smallcaps} We see a log~10~ reduction in 2^9^ seconds. + +| Hello +| +| Goodbye