diff --git a/news/changelog-1.9.md b/news/changelog-1.9.md index e409e9a3b33..be96d684a8c 100644 --- a/news/changelog-1.9.md +++ b/news/changelog-1.9.md @@ -6,6 +6,7 @@ All changes included in 1.9: - ([#13441](https://github.com/quarto-dev/quarto-cli/pull/13441)): Catch `undefined` exceptions in Pandoc failure to avoid spurious error message. - ([#13046](https://github.com/quarto-dev/quarto-cli/issues/13046)): Use new url for multiplex socket.io server as default for `format: revealjs` and `revealjs.multiplex: true`. - ([#13506](https://github.com/quarto-dev/quarto-cli/issues/13506)): Fix navbar active state detection when sidebar has no logo configured. Prevents empty logo links from interfering with navigation highlighting. +- ([#13616](https://github.com/quarto-dev/quarto-cli/issues/13616)): Fix fatal error when rendering manuscript projects with custom blocks like ConditionalBlock. - ([#13625](https://github.com/quarto-dev/quarto-cli/issues/13625)): Fix Windows file locking error (os error 32) when rendering with `--output-dir` flag. Context cleanup now happens before removing the temporary `.quarto` directory, ensuring file handles are properly closed. - ([#13633](https://github.com/quarto-dev/quarto-cli/issues/13633)): Fix detection and auto-installation of babel language packages from newer error format that doesn't explicitly mention `.ldf` filename. diff --git a/src/resources/filters/layout/manuscript.lua b/src/resources/filters/layout/manuscript.lua index a0a3f18cc40..ab21d42e138 100644 --- a/src/resources/filters/layout/manuscript.lua +++ b/src/resources/filters/layout/manuscript.lua @@ -57,10 +57,10 @@ function manuscript() -- If this is a notebook embed cell, 'lift' the contents of any child divs -- up (unroll their contents), this will help us avoid -- labeling divs marked as `cells` more than once - local blocks = pandoc.List() + local blocks = pandoc.Blocks({}) for _, childBlock in ipairs(divEl.content) do if is_regular_node(childBlock, "Div") then - tappend(blocks, childBlock.content) + blocks:extend(childBlock.content) else blocks:insert(childBlock) end diff --git a/tests/docs/smoke-all/2025/10/27/13616/.gitignore b/tests/docs/smoke-all/2025/10/27/13616/.gitignore new file mode 100644 index 00000000000..ad293093b07 --- /dev/null +++ b/tests/docs/smoke-all/2025/10/27/13616/.gitignore @@ -0,0 +1,2 @@ +/.quarto/ +**/*.quarto_ipynb diff --git a/tests/docs/smoke-all/2025/10/27/13616/13616.qmd b/tests/docs/smoke-all/2025/10/27/13616/13616.qmd new file mode 100644 index 00000000000..85e7938dae9 --- /dev/null +++ b/tests/docs/smoke-all/2025/10/27/13616/13616.qmd @@ -0,0 +1,13 @@ +--- +title: "Conditional Block in manuscript article" +_quarto: + tests: + pdf: + noErrors: true +--- + +::: {.content-visible when-format="pdf"} + +Something + +::: diff --git a/tests/docs/smoke-all/2025/10/27/13616/_quarto.yml b/tests/docs/smoke-all/2025/10/27/13616/_quarto.yml new file mode 100644 index 00000000000..2539ccd82a5 --- /dev/null +++ b/tests/docs/smoke-all/2025/10/27/13616/_quarto.yml @@ -0,0 +1,9 @@ +project: + type: manuscript + +manuscript: + article: 13616.qmd + +format: + pdf: + pdf-engine: xelatex