Revert "Powerpoint writer: consolidate text run nodes."

This reverts commit 62f83aa486.

This was already being done, it seems.
I misidentified the problem; it is really with `Str ""` nodes.
This commit is contained in:
John MacFarlane 2021-10-04 11:50:32 -07:00
parent 62f83aa486
commit 82d587493d
137 changed files with 1 additions and 9 deletions

View file

@ -348,15 +348,7 @@ instance Default PicProps where
-------------------------------------------------- --------------------------------------------------
inlinesToParElems :: [Inline] -> Pres [ParaElem] inlinesToParElems :: [Inline] -> Pres [ParaElem]
inlinesToParElems = concatMapM inlineToParElems . consolidateStrs inlinesToParElems ils = concatMapM inlineToParElems ils
where
-- we combine Str + Space combinations, because this makes
-- the resulting ooxml much more compact, with fewer independent
-- text run elements
consolidateStrs [] = []
consolidateStrs (Str t : Space : ils) = consolidateStrs (Str (t <> " ") : ils)
consolidateStrs (Space : Str t : ils) = consolidateStrs (Str (" " <> t) : ils)
consolidateStrs (il : ils) = il : consolidateStrs ils
inlineToParElems :: Inline -> Pres [ParaElem] inlineToParElems :: Inline -> Pres [ParaElem]
inlineToParElems (Str s) = do inlineToParElems (Str s) = do

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show more