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.
This commit is contained in:
Jesse Rosenthal 2016-07-01 00:52:52 -04:00
parent 3429fa6438
commit 2c62f0e122

View file

@ -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).