Skip to content

Commit 91c665a

Browse files
authored
Merge pull request #12214 from quarto-dev/execute-header-include
correctly shallow copy nested element for includes
2 parents 0502c32 + b523ebf commit 91c665a

File tree

18 files changed

+57
-31
lines changed

18 files changed

+57
-31
lines changed

src/command/render/freeze.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,10 @@ export function freezeExecuteResult(
5353
result: ExecuteResult,
5454
) {
5555
// resolve includes within executeResult
56+
// nb: Beware to not modify the original result object
5657
const innerResult = {
5758
...result,
59+
includes: result.includes ? { ...result.includes } : undefined,
5860
} as ExecuteResult;
5961
const resolveIncludes = (
6062
name: "include-in-header" | "include-before-body" | "include-after-body",

tests/.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Python Environments
22
.env
33
.venv
4-
env/
5-
venv/
4+
/env/
5+
/venv/
66
ENV/
77
env.bak/
88
venv.bak/

tests/docs/smoke-all/2024/06/19/9208.qmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ _quarto:
88
html:
99
noErrors: true
1010
printsMessage:
11-
- WARN
12-
- 'code-link.*ignored'
11+
level: WARN
12+
regex: 'code-link.*ignored'
1313
ensureHtmlElements:
1414
- []
1515
- ['pre.downlit']

tests/docs/smoke-all/2024/08/30/10291/latex-hyphen-lang-es-no-install.qmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ _quarto:
77
pdf:
88
noErrors: true
99
printsMessage:
10-
- WARN
11-
- 'missing hyphenation.*hyphen-spanish'
10+
level: WARN
11+
regex: 'missing hyphenation.*hyphen-spanish'
1212
---
1313

1414
```{r}

tests/docs/smoke-all/2024/09/30/10931-2.qmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ _quarto:
55
tests:
66
pptx:
77
printsMessage:
8-
- INFO
9-
- 'WARNING.*FloatRefTargets require'
8+
level: INFO
9+
regex: 'WARNING.*FloatRefTargets require'
1010
ensurePptxXpath:
1111
-
1212
- 2
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/.quarto/
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
project:
2+
type: default
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
format: html
3+
engine: julia
4+
_quarto:
5+
tests:
6+
html:
7+
printsMessage:
8+
level: INFO
9+
regex: 'FATAL[\s\S]*Error resolving header-includes'
10+
negate: true
11+
---
12+
13+
```{julia}
14+
?for
15+
```

tests/docs/smoke-all/crossrefs/float/latex/latex-raw-table-env-no-tbl-label.qmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ _quarto:
99
- ['[\s\S]+\\begin\{table\}\[htbp\][\s\S]+', '[\s\S]+\\caption\{\\label\{mod\}']
1010
- []
1111
printsMessage:
12-
- INFO
13-
- 'WARNING(.*)Raw LaTeX table found with non-tbl label:'
12+
level: INFO
13+
regex: 'WARNING(.*)Raw LaTeX table found with non-tbl label:'
1414
---
1515

1616
This document has a raw LaTeX table with no intent to use quarto crossref. It uses a label with `tbl-` id.

tests/smoke/env/check.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ testQuartoCmd(
1212
[],
1313
[
1414
noErrorsOrWarnings,
15-
printsMessage("INFO", /Version: 99\.9\.9/),
15+
printsMessage({level: "INFO", regex: /Version: 99\.9\.9/}),
1616
],
1717
);

0 commit comments

Comments
 (0)