aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJesse Rosenthal <jrosenthal@jhu.edu>2019-02-18 15:43:54 -0500
committerJesse Rosenthal <jrosenthal@jhu.edu>2019-02-18 15:43:54 -0500
commitbeda70b92336ebc7d9c8bc0dcb3fafbc45dee0ff (patch)
tree0b6da8801f96038a2b8ea8b9149765b93220ddc8 /src/Text
parent596f8fd06b56a4afe9497c727a522c2f287be7f3 (diff)
downloadpandoc-beda70b92336ebc7d9c8bc0dcb3fafbc45dee0ff.tar.gz
Docx reader: Trim space inside the last inline.
We have to add one final mempty when we're combining in order to trim inlines appropriately. (We need to use our own trimming routines here due to the way that formatted inlines are smushed together when converting from docx.) Closes #5273
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Readers/Docx/Combine.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Docx/Combine.hs b/src/Text/Pandoc/Readers/Docx/Combine.hs
index 855675b37..2fba3394b 100644
--- a/src/Text/Pandoc/Readers/Docx/Combine.hs
+++ b/src/Text/Pandoc/Readers/Docx/Combine.hs
@@ -166,7 +166,8 @@ isAttrModifier (AttrModifier _ _) = True
isAttrModifier _ = False
smushInlines :: [Inlines] -> Inlines
-smushInlines xs = foldl combineInlines mempty xs
+smushInlines xs = combineInlines xs' mempty
+ where xs' = foldl combineInlines mempty xs
smushBlocks :: [Blocks] -> Blocks
smushBlocks xs = foldl combineBlocks mempty xs