summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Rosenthal <jrosenthal@jhu.edu>2016-07-01 00:52:52 -0400
committerJesse Rosenthal <jrosenthal@jhu.edu>2016-07-01 00:52:52 -0400
commit2c62f0e122d71dad356cba949269377ce98ed3f8 (patch)
tree305c38dcef6c6f347c8a28b0efc8a8da789bcd73
parent3429fa6438355da63c3f418eda32b1a011ddbc40 (diff)
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.
-rw-r--r--src/Text/Pandoc/Writers/Shared.hs1
1 files changed, 1 insertions, 0 deletions
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).