Merge pull request #1523 from jkr/dropCap2

Docx reader: Make dropcap combining more efficient.
This commit is contained in:
John MacFarlane 2014-08-12 07:16:38 -07:00
commit 712ae610e0

View file

@ -462,7 +462,9 @@ bodyPartToBlocks (Paragraph pPr parparts)
bodyPartToBlocks (Paragraph pPr parparts) = do bodyPartToBlocks (Paragraph pPr parparts) = do
ils <- parPartsToInlines parparts >>= (return . normalizeSpaces) ils <- parPartsToInlines parparts >>= (return . normalizeSpaces)
dropIls <- gets docxDropCap dropIls <- gets docxDropCap
let ils' = reduceList $ dropIls ++ ils let ils' = case ils of
(x:xs) -> reduceList (dropIls ++ [x]) ++ xs
[] -> dropIls
if dropCap pPr if dropCap pPr
then do modify $ \s -> s { docxDropCap = ils' } then do modify $ \s -> s { docxDropCap = ils' }
return [] return []