git.iko.soy/typeable/pandoc
on master help sign in
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.

commit90dcd0bc8795796583a6c895d15827b1c99cfb75 authorJesse Rosenthal <jrosenthal@jhu.edu> dateSun 14 Jan 2018, 01:47 (9 years ago) parent64c4451
1 file changed+10−2
src/Text/Pandoc/Writers/Powerpoint.hs+10−2
src/Text/Pandoc/Writers/Powerpoint.hs+10−2
@@ -624,8 +624,16 @@ blocksToSlide' _ (blk : blks)
624624 (mapM (P.report . BlockNotRendered) blks >> return ())
625625 unless (null remaining)
626626 (mapM (P.report . BlockNotRendered) remaining >> return ())
627− shapesL <- blocksToShapes blksL
628− shapesR <- blocksToShapes blksR
627+ mbSplitBlksL <- splitBlocks blksL
628+ mbSplitBlksR <- splitBlocks blksR
629+ let blksL' = case mbSplitBlksL of
630+ bs : _ -> bs
631+ [] -> []
632+ let blksR' = case mbSplitBlksR of
633+ bs : _ -> bs
634+ [] -> []
635+ shapesL <- blocksToShapes blksL'
636+ shapesR <- blocksToShapes blksR'
629637 return $ TwoColumnSlide { twoColumnSlideHeader = []
630638 , twoColumnSlideLeft = shapesL
631639 , twoColumnSlideRight = shapesR