From f13afd36b506ec8b0a5185f4043dcdee239c3621 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micka=C3=ABl=20Canouil?=
<8896044+mcanouil@users.noreply.github.com>
Date: Sat, 18 Jan 2025 11:18:58 +0100
Subject: [PATCH 01/17] fix: pagebreak breaks PowerPoint
Fixes #11893
---
src/resources/filters/quarto-pre/shortcodes-handlers.lua | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/resources/filters/quarto-pre/shortcodes-handlers.lua b/src/resources/filters/quarto-pre/shortcodes-handlers.lua
index a6189d097ee..cc031c1f1d5 100644
--- a/src/resources/filters/quarto-pre/shortcodes-handlers.lua
+++ b/src/resources/filters/quarto-pre/shortcodes-handlers.lua
@@ -309,6 +309,8 @@ function handlePagebreak()
if FORMAT == 'docx' then
return pandoc.RawBlock('openxml', pagebreak.ooxml)
+ elseif FORMAT == 'pptx' then
+ return pandoc.Para{pandoc.Str ''}
elseif FORMAT:match 'latex' then
return pandoc.RawBlock('tex', pagebreak.latex)
elseif FORMAT:match 'odt' then
@@ -326,4 +328,4 @@ function handlePagebreak()
return pandoc.Para{pandoc.Str '\f'}
end
-end
\ No newline at end of file
+end
From b33d991a423524158e1b45a07d11efe803545e1e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micka=C3=ABl=20Canouil?=
<8896044+mcanouil@users.noreply.github.com>
Date: Sat, 18 Jan 2025 11:47:24 +0100
Subject: [PATCH 02/17] chore: Update changelog-1.7.md
---
news/changelog-1.7.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/news/changelog-1.7.md b/news/changelog-1.7.md
index 7ae57de4d9a..850aa74fb28 100644
--- a/news/changelog-1.7.md
+++ b/news/changelog-1.7.md
@@ -53,6 +53,7 @@ All changes included in 1.7:
- ([#11699](https://github.com/quarto-dev/quarto-cli/issues/11699)): Fix crash with `video` shortcode inside HTML comments.
- Expose new `quarto.paths.tinytex_bin_dir` in Quarto's Lua API. If TinyTeX is found by Quarto, this will be set to the path to the `bin` directory of the TinyTeX installation where command line tool are located (e.g., `pdflatex`, `tlmgr`, etc.). If TinyTeX is not found, this will be `nil`, meaning Quarto will use the system PATH to find the command line tools.
- Fix `pandoc.mediabag` Lua typings so autocompletions work with the Lua LSP integration.
+- ([#11896](https://github.com/quarto-dev/quarto-cli/pull/11896): fix invalid PowerPoint (`pptx`) when `{{< pagebreak >}}` inserts `\f`.
## Engines
From 0e32ad952f4f0becda4eb96523a904207303dc97 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micka=C3=ABl=20Canouil?=
<8896044+mcanouil@users.noreply.github.com>
Date: Sat, 18 Jan 2025 11:48:06 +0100
Subject: [PATCH 03/17] fix: typo
---
news/changelog-1.7.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/news/changelog-1.7.md b/news/changelog-1.7.md
index 850aa74fb28..885de841302 100644
--- a/news/changelog-1.7.md
+++ b/news/changelog-1.7.md
@@ -31,7 +31,7 @@ All changes included in 1.7:
## `html` format
-- ([#11860])(https://github.com/quarto-dev/quarto-cli/issues/11860)): ES6 modules that import other local JS modules in documents with `embed-resources: true` are now correctly embedded.
+- ([#11860](https://github.com/quarto-dev/quarto-cli/issues/11860)): ES6 modules that import other local JS modules in documents with `embed-resources: true` are now correctly embedded.
## `pdf` format
From 3ec28da7b4d0b3d832913e6c27aea890af4de691 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micka=C3=ABl=20Canouil?=
<8896044+mcanouil@users.noreply.github.com>
Date: Sat, 18 Jan 2025 11:48:37 +0100
Subject: [PATCH 04/17] fix: missing closing parenthesis
---
news/changelog-1.7.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/news/changelog-1.7.md b/news/changelog-1.7.md
index 885de841302..151ab5e664b 100644
--- a/news/changelog-1.7.md
+++ b/news/changelog-1.7.md
@@ -53,7 +53,7 @@ All changes included in 1.7:
- ([#11699](https://github.com/quarto-dev/quarto-cli/issues/11699)): Fix crash with `video` shortcode inside HTML comments.
- Expose new `quarto.paths.tinytex_bin_dir` in Quarto's Lua API. If TinyTeX is found by Quarto, this will be set to the path to the `bin` directory of the TinyTeX installation where command line tool are located (e.g., `pdflatex`, `tlmgr`, etc.). If TinyTeX is not found, this will be `nil`, meaning Quarto will use the system PATH to find the command line tools.
- Fix `pandoc.mediabag` Lua typings so autocompletions work with the Lua LSP integration.
-- ([#11896](https://github.com/quarto-dev/quarto-cli/pull/11896): fix invalid PowerPoint (`pptx`) when `{{< pagebreak >}}` inserts `\f`.
+- ([#11896](https://github.com/quarto-dev/quarto-cli/pull/11896)): fix invalid PowerPoint (`pptx`) when `{{< pagebreak >}}` inserts `\f`.
## Engines
From b75b3f7155880ad74b97969629e9f90e4ff941f5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micka=C3=ABl=20Canouil?=
<8896044+mcanouil@users.noreply.github.com>
Date: Sat, 18 Jan 2025 11:49:21 +0100
Subject: [PATCH 05/17] chore: Update changelog-1.7.md
---
news/changelog-1.7.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/news/changelog-1.7.md b/news/changelog-1.7.md
index 151ab5e664b..b12eed777e4 100644
--- a/news/changelog-1.7.md
+++ b/news/changelog-1.7.md
@@ -53,7 +53,7 @@ All changes included in 1.7:
- ([#11699](https://github.com/quarto-dev/quarto-cli/issues/11699)): Fix crash with `video` shortcode inside HTML comments.
- Expose new `quarto.paths.tinytex_bin_dir` in Quarto's Lua API. If TinyTeX is found by Quarto, this will be set to the path to the `bin` directory of the TinyTeX installation where command line tool are located (e.g., `pdflatex`, `tlmgr`, etc.). If TinyTeX is not found, this will be `nil`, meaning Quarto will use the system PATH to find the command line tools.
- Fix `pandoc.mediabag` Lua typings so autocompletions work with the Lua LSP integration.
-- ([#11896](https://github.com/quarto-dev/quarto-cli/pull/11896)): fix invalid PowerPoint (`pptx`) when `{{< pagebreak >}}` inserts `\f`.
+- ([#11896](https://github.com/quarto-dev/quarto-cli/pull/11896)): fix `\f` form feed character not valid in Powerpoint (`pptx`).
## Engines
From c1fa9e6ee8f3b81977d9d7e2d1023dd7ae252f1d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micka=C3=ABl=20Canouil?=
<8896044+mcanouil@users.noreply.github.com>
Date: Sat, 18 Jan 2025 11:50:15 +0100
Subject: [PATCH 06/17] chore: mention pagebreak shortcode in item
---
news/changelog-1.7.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/news/changelog-1.7.md b/news/changelog-1.7.md
index b12eed777e4..1b5eab46c64 100644
--- a/news/changelog-1.7.md
+++ b/news/changelog-1.7.md
@@ -53,7 +53,7 @@ All changes included in 1.7:
- ([#11699](https://github.com/quarto-dev/quarto-cli/issues/11699)): Fix crash with `video` shortcode inside HTML comments.
- Expose new `quarto.paths.tinytex_bin_dir` in Quarto's Lua API. If TinyTeX is found by Quarto, this will be set to the path to the `bin` directory of the TinyTeX installation where command line tool are located (e.g., `pdflatex`, `tlmgr`, etc.). If TinyTeX is not found, this will be `nil`, meaning Quarto will use the system PATH to find the command line tools.
- Fix `pandoc.mediabag` Lua typings so autocompletions work with the Lua LSP integration.
-- ([#11896](https://github.com/quarto-dev/quarto-cli/pull/11896)): fix `\f` form feed character not valid in Powerpoint (`pptx`).
+- ([#11896](https://github.com/quarto-dev/quarto-cli/pull/11896)): fix `\f` (`{{< pagebreak >}}`) form feed character not valid in Powerpoint (`pptx`).
## Engines
From 900b34c3cc3168576a1fc85d7642ec3acf5a208f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micka=C3=ABl=20Canouil?=
<8896044+mcanouil@users.noreply.github.com>
Date: Sat, 18 Jan 2025 11:51:09 +0100
Subject: [PATCH 07/17] chore: capital letter missing
---
news/changelog-1.7.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/news/changelog-1.7.md b/news/changelog-1.7.md
index 1b5eab46c64..d11b3400196 100644
--- a/news/changelog-1.7.md
+++ b/news/changelog-1.7.md
@@ -53,7 +53,7 @@ All changes included in 1.7:
- ([#11699](https://github.com/quarto-dev/quarto-cli/issues/11699)): Fix crash with `video` shortcode inside HTML comments.
- Expose new `quarto.paths.tinytex_bin_dir` in Quarto's Lua API. If TinyTeX is found by Quarto, this will be set to the path to the `bin` directory of the TinyTeX installation where command line tool are located (e.g., `pdflatex`, `tlmgr`, etc.). If TinyTeX is not found, this will be `nil`, meaning Quarto will use the system PATH to find the command line tools.
- Fix `pandoc.mediabag` Lua typings so autocompletions work with the Lua LSP integration.
-- ([#11896](https://github.com/quarto-dev/quarto-cli/pull/11896)): fix `\f` (`{{< pagebreak >}}`) form feed character not valid in Powerpoint (`pptx`).
+- ([#11896](https://github.com/quarto-dev/quarto-cli/pull/11896)): fix `\f` (`{{< pagebreak >}}`) form feed character not valid in PowerPoint (`pptx`).
## Engines
From 4b81322f4f749f8f826de787dd34b15e75fb290c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micka=C3=ABl=20Canouil?=
<8896044+mcanouil@users.noreply.github.com>
Date: Mon, 20 Jan 2025 22:42:31 +0100
Subject: [PATCH 08/17] fix: return empty element as suggested
---
src/resources/filters/quarto-pre/shortcodes-handlers.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/resources/filters/quarto-pre/shortcodes-handlers.lua b/src/resources/filters/quarto-pre/shortcodes-handlers.lua
index cc031c1f1d5..f5e6508ee50 100644
--- a/src/resources/filters/quarto-pre/shortcodes-handlers.lua
+++ b/src/resources/filters/quarto-pre/shortcodes-handlers.lua
@@ -310,7 +310,7 @@ function handlePagebreak()
if FORMAT == 'docx' then
return pandoc.RawBlock('openxml', pagebreak.ooxml)
elseif FORMAT == 'pptx' then
- return pandoc.Para{pandoc.Str ''}
+ return {}
elseif FORMAT:match 'latex' then
return pandoc.RawBlock('tex', pagebreak.latex)
elseif FORMAT:match 'odt' then
From bb28437217179bcc8df27a2586ae196578432e7d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micka=C3=ABl=20Canouil?=
<8896044+mcanouil@users.noreply.github.com>
Date: Sat, 1 Feb 2025 16:24:28 +0100
Subject: [PATCH 09/17] test: check content and slide number
---
tests/docs/smoke-all/2025/02/01/11896.qmd | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
create mode 100644 tests/docs/smoke-all/2025/02/01/11896.qmd
diff --git a/tests/docs/smoke-all/2025/02/01/11896.qmd b/tests/docs/smoke-all/2025/02/01/11896.qmd
new file mode 100644
index 00000000000..fb736c3361e
--- /dev/null
+++ b/tests/docs/smoke-all/2025/02/01/11896.qmd
@@ -0,0 +1,23 @@
+---
+title: Pagebreak should have no effect on slide count
+format: pptx
+_quarto:
+ tests:
+ pptx:
+ ensurePptxMaxSlides:
+ - 2
+ ensurePptxXpath:
+ -
+ - 1
+ -
+ - 'BeforeAfter'
+ - []
+---
+
+## Slide
+
+Before
+
+{{< pagebreak >}}
+
+After
From 215b5f11605cd1ae711c77a181bc95b369347464 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micka=C3=ABl=20Canouil?=
<8896044+mcanouil@users.noreply.github.com>
Date: Sat, 1 Feb 2025 16:48:13 +0100
Subject: [PATCH 10/17] test: there is 1 not 2 slides
---
tests/docs/smoke-all/2025/02/01/11896.qmd | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/docs/smoke-all/2025/02/01/11896.qmd b/tests/docs/smoke-all/2025/02/01/11896.qmd
index fb736c3361e..7e6ce0d74e1 100644
--- a/tests/docs/smoke-all/2025/02/01/11896.qmd
+++ b/tests/docs/smoke-all/2025/02/01/11896.qmd
@@ -5,7 +5,7 @@ _quarto:
tests:
pptx:
ensurePptxMaxSlides:
- - 2
+ - 1
ensurePptxXpath:
-
- 1
From 8f9d5b5021f1e96e7a97d7a4a7f7d25d49233ab1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micka=C3=ABl=20Canouil?=
<8896044+mcanouil@users.noreply.github.com>
Date: Sat, 1 Feb 2025 17:04:45 +0100
Subject: [PATCH 11/17] test: tweak test
---
tests/docs/smoke-all/2025/02/01/11896.qmd | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/tests/docs/smoke-all/2025/02/01/11896.qmd b/tests/docs/smoke-all/2025/02/01/11896.qmd
index 7e6ce0d74e1..57fd226b91c 100644
--- a/tests/docs/smoke-all/2025/02/01/11896.qmd
+++ b/tests/docs/smoke-all/2025/02/01/11896.qmd
@@ -8,9 +8,8 @@ _quarto:
- 1
ensurePptxXpath:
-
- - 1
- -
- - 'BeforeAfter'
+ - 2
+ - ['Before/a:t>/a:r>/a:p>/a:pPr>After/a:t>']
- []
---
From 19c310599c78d5b4a01f21943c094836c7f0db6c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micka=C3=ABl=20Canouil?=
<8896044+mcanouil@users.noreply.github.com>
Date: Sat, 1 Feb 2025 17:09:05 +0100
Subject: [PATCH 12/17] test: set 2 slides with no pattern for the first
---
tests/docs/smoke-all/2025/02/01/11896.qmd | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tests/docs/smoke-all/2025/02/01/11896.qmd b/tests/docs/smoke-all/2025/02/01/11896.qmd
index 57fd226b91c..186875f38e5 100644
--- a/tests/docs/smoke-all/2025/02/01/11896.qmd
+++ b/tests/docs/smoke-all/2025/02/01/11896.qmd
@@ -5,11 +5,13 @@ _quarto:
tests:
pptx:
ensurePptxMaxSlides:
- - 1
+ - 2
ensurePptxXpath:
-
- 2
- - ['Before/a:t>/a:r>/a:p>/a:pPr>After/a:t>']
+ -
+ -
+ - 'Before/a:t>/a:r>/a:p>/a:pPr>After/a:t>'
- []
---
From 64adb1d840df10d32f009b657b724af5d53ca226 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micka=C3=ABl=20Canouil?=
<8896044+mcanouil@users.noreply.github.com>
Date: Sat, 1 Feb 2025 17:20:20 +0100
Subject: [PATCH 13/17] test: try without title slide
---
tests/docs/smoke-all/2025/02/01/11896.qmd | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/tests/docs/smoke-all/2025/02/01/11896.qmd b/tests/docs/smoke-all/2025/02/01/11896.qmd
index 186875f38e5..788cc9911ca 100644
--- a/tests/docs/smoke-all/2025/02/01/11896.qmd
+++ b/tests/docs/smoke-all/2025/02/01/11896.qmd
@@ -1,16 +1,14 @@
---
-title: Pagebreak should have no effect on slide count
format: pptx
_quarto:
tests:
pptx:
ensurePptxMaxSlides:
- - 2
+ - 1
ensurePptxXpath:
-
- - 2
+ - 1
-
- -
- 'Before/a:t>/a:r>/a:p>/a:pPr>After/a:t>'
- []
---
From 9bdf5879ecb7f553d1eeb3937e2a8d88465aeff7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micka=C3=ABl=20Canouil?=
<8896044+mcanouil@users.noreply.github.com>
Date: Sat, 1 Feb 2025 19:26:38 +0100
Subject: [PATCH 14/17] test: rm double /
---
tests/docs/smoke-all/2025/02/01/11896.qmd | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/docs/smoke-all/2025/02/01/11896.qmd b/tests/docs/smoke-all/2025/02/01/11896.qmd
index 788cc9911ca..164ca738112 100644
--- a/tests/docs/smoke-all/2025/02/01/11896.qmd
+++ b/tests/docs/smoke-all/2025/02/01/11896.qmd
@@ -9,7 +9,7 @@ _quarto:
-
- 1
-
- - 'Before/a:t>/a:r>/a:p>/a:pPr>After/a:t>'
+ - 'BeforeAfter'
- []
---
From fae793df25d58bd153d51f68c7c9bec6a4ad2bce Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micka=C3=ABl=20Canouil?=
<8896044+mcanouil@users.noreply.github.com>
Date: Sat, 1 Feb 2025 21:51:45 +0100
Subject: [PATCH 15/17] test: try regex instead (no escaping)
---
tests/docs/smoke-all/2025/02/01/11896.qmd | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/tests/docs/smoke-all/2025/02/01/11896.qmd b/tests/docs/smoke-all/2025/02/01/11896.qmd
index 164ca738112..9e97fbb799c 100644
--- a/tests/docs/smoke-all/2025/02/01/11896.qmd
+++ b/tests/docs/smoke-all/2025/02/01/11896.qmd
@@ -5,12 +5,8 @@ _quarto:
pptx:
ensurePptxMaxSlides:
- 1
- ensurePptxXpath:
- -
- - 1
- -
- - 'BeforeAfter'
- - []
+ ensurePptxRegexMatches:
+ - 'BeforeAfter'
---
## Slide
From 798a820bf569bc4e2c461063d32c220c2279a9df Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micka=C3=ABl=20Canouil?=
<8896044+mcanouil@users.noreply.github.com>
Date: Sat, 1 Feb 2025 22:05:45 +0100
Subject: [PATCH 16/17] test: escaping /
---
tests/docs/smoke-all/2025/02/01/11896.qmd | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/docs/smoke-all/2025/02/01/11896.qmd b/tests/docs/smoke-all/2025/02/01/11896.qmd
index 9e97fbb799c..c5161b730dc 100644
--- a/tests/docs/smoke-all/2025/02/01/11896.qmd
+++ b/tests/docs/smoke-all/2025/02/01/11896.qmd
@@ -6,7 +6,7 @@ _quarto:
ensurePptxMaxSlides:
- 1
ensurePptxRegexMatches:
- - 'BeforeAfter'
+ - 'Before<\/a:t><\/a:r><\/a:p><\/a:pPr>After<\/a:t>'
---
## Slide
From 949d40574f78878bc0667e45d3e5ab34810e448e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micka=C3=ABl=20Canouil?=
<8896044+mcanouil@users.noreply.github.com>
Date: Thu, 6 Feb 2025 18:48:48 +0100
Subject: [PATCH 17/17] test: set slide number
---
tests/docs/smoke-all/2025/02/01/11896.qmd | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/docs/smoke-all/2025/02/01/11896.qmd b/tests/docs/smoke-all/2025/02/01/11896.qmd
index c5161b730dc..abc513bf573 100644
--- a/tests/docs/smoke-all/2025/02/01/11896.qmd
+++ b/tests/docs/smoke-all/2025/02/01/11896.qmd
@@ -6,7 +6,8 @@ _quarto:
ensurePptxMaxSlides:
- 1
ensurePptxRegexMatches:
- - 'Before<\/a:t><\/a:r><\/a:p><\/a:pPr>After<\/a:t>'
+ - ['Before<\/a:t><\/a:r><\/a:p><\/a:pPr>After<\/a:t>']
+ - 1
---
## Slide