aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJesse Rosenthal <jrosenthal@jhu.edu>2018-01-14 01:47:38 -0500
committerJesse Rosenthal <jrosenthal@jhu.edu>2018-01-14 01:50:16 -0500
commit90dcd0bc8795796583a6c895d15827b1c99cfb75 (patch)
treef384a8af5aaebb53335a9435f1406dd231c859a7 /src/Text/Pandoc
parent64c4451ef3b55a6c545de232af62780e0f5766d7 (diff)
downloadpandoc-90dcd0bc8795796583a6c895d15827b1c99cfb75.tar.gz
Powerpoint writer: Avoid overlapping blocks in column output.
Just as a slide can't have an image and text on the same slide because of overlapping, we can't have both in a single column. We run splitBlocks on the text in the column and discard the rest.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Writers/Powerpoint.hs12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/Powerpoint.hs b/src/Text/Pandoc/Writers/Powerpoint.hs
index 4b6ea0853..647c37a0b 100644
--- a/src/Text/Pandoc/Writers/Powerpoint.hs
+++ b/src/Text/Pandoc/Writers/Powerpoint.hs
@@ -624,8 +624,16 @@ blocksToSlide' _ (blk : blks)
(mapM (P.report . BlockNotRendered) blks >> return ())
unless (null remaining)
(mapM (P.report . BlockNotRendered) remaining >> return ())
- shapesL <- blocksToShapes blksL
- shapesR <- blocksToShapes blksR
+ mbSplitBlksL <- splitBlocks blksL
+ mbSplitBlksR <- splitBlocks blksR
+ let blksL' = case mbSplitBlksL of
+ bs : _ -> bs
+ [] -> []
+ let blksR' = case mbSplitBlksR of
+ bs : _ -> bs
+ [] -> []
+ shapesL <- blocksToShapes blksL'
+ shapesR <- blocksToShapes blksR'
return $ TwoColumnSlide { twoColumnSlideHeader = []
, twoColumnSlideLeft = shapesL
, twoColumnSlideRight = shapesR