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
This commit is contained in:
Jesse Rosenthal
2019-02-18 15:43:54 -05:00
parent 596f8fd06b
commit beda70b923
+2 -1
View File
@@ -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