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
commitbeda70b92336ebc7d9c8bc0dcb3fafbc45dee0ff
authorJesse Rosenthal <jrosenthal@jhu.edu>
dateMon 18 Feb 2019, 15:43 (8 years ago)
parent596f8fd
src/Text/Pandoc/Readers/Docx/Combine.hs+2−1
@@ -166,7 +166,8 @@ isAttrModifier (AttrModifier _ _) = True
166166isAttrModifier _ = False
167167
168168smushInlines :: [Inlines] -> Inlines
169−smushInlines xs = foldl combineInlines mempty xs
169+smushInlines xs = combineInlines xs' mempty
170+ where xs' = foldl combineInlines mempty xs
170171
171172smushBlocks :: [Blocks] -> Blocks
172173smushBlocks xs = foldl combineBlocks mempty xs