From 2c62f0e122d71dad356cba949269377ce98ed3f8 Mon Sep 17 00:00:00 2001 From: Jesse Rosenthal Date: Fri, 1 Jul 2016 00:52:52 -0400 Subject: Writers: treat SoftBreak as space for stripping In Writers.Shared, we strip leading and trailing spaces for display math. Since SoftBreak's are treated as spaces, we should strip those too. --- src/Text/Pandoc/Writers/Shared.hs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/Text') diff --git a/src/Text/Pandoc/Writers/Shared.hs b/src/Text/Pandoc/Writers/Shared.hs index 865d10123..0f0edbbd1 100644 --- a/src/Text/Pandoc/Writers/Shared.hs +++ b/src/Text/Pandoc/Writers/Shared.hs @@ -148,6 +148,7 @@ isDisplayMath _ = False stripLeadingTrailingSpace :: [Inline] -> [Inline] stripLeadingTrailingSpace = go . reverse . go . reverse where go (Space:xs) = xs + go (SoftBreak:xs) = xs go xs = xs -- Put display math in its own block (for ODT/DOCX). -- cgit v1.2.3