aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-08-12 07:16:38 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2014-08-12 07:16:38 -0700
commit712ae610e0f0e34f0dc1e78f0ed671ce7f2cabc9 (patch)
treefa632ed7d08ed3a178adf17526153a3bdf23d331 /src/Text
parent4c88e64894af56a71a15289a70b2ae7950157f86 (diff)
parente4a8e4a636fb4b9bc860591f31bdb8e4dde62049 (diff)
downloadpandoc-712ae610e0f0e34f0dc1e78f0ed671ce7f2cabc9.tar.gz
Merge pull request #1523 from jkr/dropCap2
Docx reader: Make dropcap combining more efficient.
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Readers/Docx.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Docx.hs b/src/Text/Pandoc/Readers/Docx.hs
index c856ca30a..10dc45581 100644
--- a/src/Text/Pandoc/Readers/Docx.hs
+++ b/src/Text/Pandoc/Readers/Docx.hs
@@ -462,7 +462,9 @@ bodyPartToBlocks (Paragraph pPr parparts)
bodyPartToBlocks (Paragraph pPr parparts) = do
ils <- parPartsToInlines parparts >>= (return . normalizeSpaces)
dropIls <- gets docxDropCap
- let ils' = reduceList $ dropIls ++ ils
+ let ils' = case ils of
+ (x:xs) -> reduceList (dropIls ++ [x]) ++ xs
+ [] -> dropIls
if dropCap pPr
then do modify $ \s -> s { docxDropCap = ils' }
return []