From 90dcd0bc8795796583a6c895d15827b1c99cfb75 Mon Sep 17 00:00:00 2001 From: Jesse Rosenthal Date: Sun, 14 Jan 2018 01:47:38 -0500 Subject: 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. --- src/Text/Pandoc/Writers/Powerpoint.hs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/Text/Pandoc') 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 -- cgit v1.2.3