Docx reader: combine inlines properly in dropcaps.

Make sure that adjacent inlines are combined properly in dropcaps. This
updates the test results as well.
This commit is contained in:
Jesse Rosenthal
2014-08-11 23:31:16 -04:00
parent 0808449547
commit 45ec035e93
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -462,7 +462,7 @@ bodyPartToBlocks (Paragraph pPr parparts)
bodyPartToBlocks (Paragraph pPr parparts) = do
ils <- parPartsToInlines parparts >>= (return . normalizeSpaces)
dropIls <- gets docxDropCap
let ils' = dropIls ++ ils
let ils' = reduceList $ dropIls ++ ils
if dropCap pPr
then do modify $ \s -> s { docxDropCap = ils' }
return []
+2 -2
View File
@@ -1,4 +1,4 @@
[Para [Str "D",Str "rop",Space,Str "cap."]
[Para [Str "Drop",Space,Str "cap."]
,Para [Str "Next",Space,Str "paragraph."]
,Para [Str "D",Str "rop",Space,Str "cap",Space,Str "in",Space,Str "margin."]
,Para [Str "Drop",Space,Str "cap",Space,Str "in",Space,Str "margin."]
,Para [Str "Drop",Space,Str "cap",Space,Str "(not",Space,Str "really)."]]