-
Notifications
You must be signed in to change notification settings - Fork 331
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pptx - add a cleanup finalize step to remove RawBlock different from …
…openxml Pandoc may have an issue in its writer as, like other formats it will correctly ignore other format RawBlock, but it seems to mess the created pptx file (e.g. choosing the wrong layout, creating empty new slides)
- Loading branch information
Showing
2 changed files
with
19 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
function pptx_raw_cleanup() | ||
if not _quarto.format.isPowerPointOutput() then | ||
return {} | ||
end | ||
return { | ||
-- Remove any non-openxml RawBlock as it seems to mess pandoc Powerpoint writer | ||
-- https://github.com/quarto-dev/quarto-cli/issues/9680 | ||
-- https://github.com/quarto-dev/quarto-cli/issues/9681 | ||
RawBlock = function(el) | ||
if el.format ~= "openxml" then | ||
return {} | ||
end | ||
return el | ||
end | ||
} | ||
end |