git.iko.soy/typeable/pandoc
on master help sign in
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.

commit2c62f0e122d71dad356cba949269377ce98ed3f8 authorJesse Rosenthal <jrosenthal@jhu.edu> dateFri 1 Jul 2016, 00:52 (10 years ago) parent3429fa6
1 file changed+1
src/Text/Pandoc/Writers/Shared.hs+1
src/Text/Pandoc/Writers/Shared.hs+1
@@ -148,6 +148,7 @@ isDisplayMath _ = False
148148stripLeadingTrailingSpace :: [Inline] -> [Inline]
149149stripLeadingTrailingSpace = go . reverse . go . reverse
150150 where go (Space:xs) = xs
151+ go (SoftBreak:xs) = xs
151152 go xs = xs
152153
153154-- Put display math in its own block (for ODT/DOCX).