Skip to content

Commit 99fb153

Browse files
authored
Merge branch 'main' into jk/engine-commands
2 parents 1d2d7a1 + 555a4d1 commit 99fb153

File tree

96 files changed

+3702
-2949
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+3702
-2949
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -29,31 +29,29 @@ body:
2929
You can share a Quarto document using the following syntax, _i.e._, using more backticks than you have in your document (usually four ` ```` `).
3030
For example with Quarto CLI >=1.5:
3131
32-
`````md
33-
````qmd
34-
---
35-
title: "Reproducible Quarto Document"
36-
format: html
37-
engine: jupyter
38-
---
39-
40-
This is a reproducible Quarto document using `format: html`.
41-
It is written in Markdown and contains embedded Python code.
42-
When you run the code, it will produce a message.
43-
44-
```{python}
45-
print("Hello, world!")
46-
```
47-
48-
![An image]({{< placeholder 600 400 >}}){#fig-placeholder}
49-
50-
{{< lipsum 1 >}}
51-
52-
A reference to @fig-placeholder.
53-
54-
The end.
55-
````
56-
`````
32+
````qmd
33+
---
34+
title: "Reproducible Quarto Document"
35+
format: html
36+
engine: jupyter
37+
---
38+
39+
This is a reproducible Quarto document using `format: html`.
40+
It is written in Markdown and contains embedded Python code.
41+
When you run the code, it will produce a message.
42+
43+
```{python}
44+
print("Hello, world!")
45+
```
46+
47+
![An image]({{< placeholder 600 400 >}}){#fig-placeholder}
48+
49+
{{< lipsum 1 >}}
50+
51+
A reference to @fig-placeholder.
52+
53+
The end.
54+
````
5755
5856
- type: textarea
5957
attributes:

.github/actions/cache-typst/action.yml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,24 @@
1-
name: "Cache Typst package"
1+
name: "Restore any Typst package cache"
22
description: "Configures the caching for Typst packages"
3+
outputs:
4+
cache-hit:
5+
description: "Was a cache found with primary key ?"
6+
value: ${{ steps.cache-typst-restore.outputs.cache-hit }}
7+
cache-primary-key:
8+
description: "Key of the cache to find and save"
9+
value: ${{ steps.cache-typst-restore.outputs.cache-primary-key }}
10+
cache-matched-key:
11+
description: "Key of the cache found and used."
12+
value: ${{ steps.cache-typst-restore.outputs.cache-primary-key }}
13+
cache-path:
14+
description: "where is the packages cache for typst ?"
15+
value: ${{ steps.cache-typst-path.outputs.TYPST_CACHE }}
316

417
runs:
518
using: "composite"
619
steps:
720
- name: Typst Cache path
21+
id: cache-typst-path
822
run: |
923
case $RUNNER_OS in
1024
"Linux")
@@ -21,13 +35,14 @@ runs:
2135
exit 1
2236
;;
2337
esac
38+
echo "TYPST_CACHE=${TYPST_CACHE}" >> $GITHUB_OUTPUT
2439
shell: bash
2540

2641
- name: Cache Typst package folder
27-
uses: actions/cache@v4
42+
id: cache-typst-restore
43+
uses: actions/cache/restore@v4
2844
with:
2945
path: ${{ env.TYPST_CACHE }}
30-
key: ${{ runner.os }}-typst-1-${{ github.run_id }}
46+
key: ${{ runner.os }}-typst-1
3147
restore-keys: |
32-
${{ runner.os }}-typst-1-
33-
save-always: true
48+
${{ runner.os }}-typst-

.github/workflows/test-smokes.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ jobs:
130130
renv::restore()
131131
# Install dev versions for our testing
132132
# Use r-universe to avoid github api calls
133-
try(install.packages('knitr', repos = 'https://yihui.r-universe.dev'))
134-
try(install.packages('rmarkdown', repos = 'https://rstudio.r-universe.dev'))
133+
try(install.packages('rmarkdown', repos = c('https://rstudio.r-universe.dev', getOption('repos'))))
134+
try(install.packages('knitr', repos = c('https://yihui.r-universe.dev', getOption('repos'))))
135135
if ('${{ inputs.extra-r-packages }}' != '') {
136136
cat(sprintf("::notice::Running with the following extra R packages for pak: %s\n", "${{ inputs.extra-r-packages }}"))
137137
renv::install(strsplit("${{ inputs.extra-r-packages }}", split = ",")[[1]])
@@ -143,7 +143,7 @@ jobs:
143143
- name: Install uv for Python
144144
uses: astral-sh/setup-uv@v3
145145
with:
146-
version: "0.5.6"
146+
version: "0.5.9"
147147
enable-cache: true
148148
cache-dependency-glob: "tests/uv.lock"
149149

@@ -161,6 +161,7 @@ jobs:
161161
quarto install tinytex
162162
163163
- name: Cache Typst packages
164+
id: cache-typst
164165
uses: ./.github/actions/cache-typst
165166

166167
- name: Install Chrome
@@ -169,7 +170,7 @@ jobs:
169170
- name: Setup Julia
170171
uses: julia-actions/setup-julia@v2
171172
with:
172-
version: "1.10"
173+
version: "1.11"
173174

174175
- name: Cache Julia Packages
175176
uses: julia-actions/cache@v2
@@ -183,7 +184,7 @@ jobs:
183184
export JUPYTER=$(find $(dirname $(uv run --frozen which jupyter))/ -type f -name "jupyter.exe" -o -name "jupyter")
184185
uv run --frozen julia --color=yes --project=. -e "import Pkg; Pkg.instantiate(); Pkg.build(\"IJulia\"); Pkg.precompile()"
185186
echo "Julia Jupyter:"
186-
julia --project=. -e "import IJulia;println(IJulia.JUPYTER);println(IJulia.find_jupyter_subcommand(\"notebook\"))"
187+
uv run julia --project=. -e "import IJulia;println(IJulia.JUPYTER);println(IJulia.find_jupyter_subcommand(\"notebook\"))"
187188
188189
- name: Setup timing file for timed test
189190
if: ${{ matrix.time-test == true }}
@@ -289,6 +290,13 @@ jobs:
289290
name: timed test file
290291
path: tests/timing-for-ci.txt
291292

293+
- name: Save Typst cache
294+
if: always()
295+
uses: actions/cache/save@v4
296+
with:
297+
key: ${{ steps.cache-typst.outputs.cache-primary-key }}
298+
path: ${{ steps.cache-typst.outputs.cache-path }}
299+
292300
- uses: actions/upload-artifact@v4
293301
# PLaywright test only runs on Linux for now
294302
if: ${{ !cancelled() && runner.os != 'Windows' }}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
- [ ] ensure main is up to date and tests are passing on latest commit.
2+
- [ ] create new prerelease installers
3+
- Click Actions -> Build Installers -> "Run Workflow" Dropdown Menu
4+
- Select the main branch in the "Use workflow from..." dropdown
5+
- Check "Pre-release" (or ensure it's checked)
6+
- Check "Publish release" (or ensure it's checked)
7+
- [ ] Click "Run Workflow"
8+
- If workflow fails for some reason, re-run all jobs and not only failed jobs or trigger a new clean build from Actions -> Build Installers -> "Run Workflow" Dropdown Menu.
9+
This is important because workflow commit an update to version.txt to main, and revert if cancelled or failure. A triggering a new workflow needs to re-run the configure step.
10+
- If everything went well:
11+
- New release prerelease should be on Github at <https://github.com/quarto-dev/quarto-cli/releases>
12+
- A new tag should be on main for the new prerelease version
13+
- `version.txt` on main should have been updated by the workflow to the pre-release version just released: https://github.com/quarto-dev/quarto-cli/blob/main/version.txt

dev-docs/checklist-make-a-new-stable-quarto-release.md renamed to dev-docs/checklist-make-a-new-stable-quarto-release copy.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
- Uncheck "Pre-release" (or ensure it's unchecked)
99
- Check "Publish release" (or ensure it's checked)
1010
- [ ] Click "Run Workflow"
11+
- If workflow fails for some reason, re-run all jobs and not only failed jobs or trigger a new clean build from Actions -> Build Installers -> "Run Workflow" Dropdown Menu
1112
- [ ] update release on pypi repo
1213
- Goto the [quarto-cli-pypi repo](https://github.com/quarto-dev/quarto-cli-pypi)
1314
- Update `version.txt` to be the version you'd like to publish and commit
@@ -24,4 +25,4 @@
2425
- **Publishing Production**: You may elect to publish to production pypyi by checking the `Production Release` option
2526
- Published to: <https://pypi.org/project/quarto-cli/>
2627
- Take a sip of tea ☕, bask in the glory of automation.
27-
- [ ] Update the stable changelog by moving entries to the "in previous release"
28+
- [ ] Update the stable changelog by moving entries from "In this release" to the "In previous releases" section

news/changelog-1.7.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,43 @@ All changes included in 1.7:
44

55
- ([#11509](https://github.com/quarto-dev/quarto-cli/issues/11509)): Fix link-decoration regression in HTML formats.
66
- ([#11532](https://github.com/quarto-dev/quarto-cli/issues/11532)): Fix regression for [#660](https://github.com/quarto-dev/quarto-cli/issues/660), which causes files to have incorrect permissions when Quarto is installed in a location not writable by the current user.
7+
- ([#11549](https://github.com/quarto-dev/quarto-cli/issues/11549)): Fix regression in rendering `dashboard` tabsets into cards without titles.
78
- ([#11580](https://github.com/quarto-dev/quarto-cli/issues/11580)): Fix regression with documents containing `categories` fields that are not strings.
9+
- ([#11752](https://github.com/quarto-dev/quarto-cli/issues/11752)): Fix regression with non-alphanumeric characters in `categories` preventing correct filtering of listing.
810

911
## YAML validation
1012

1113
- ([#11654](https://github.com/quarto-dev/quarto-cli/issues/11654)): Allow `page-inset` as value in `column` key for code cells.
1214

15+
## Website projects
16+
17+
- ([#11701](https://github.com/quarto-dev/quarto-cli/issues/11701)): Wrap HTML emitted by EJS templates in `{=html}` blocks to avoid memory blowup issues with Pandoc's parser.
18+
19+
## Book projects
20+
21+
- ([#11520](https://github.com/quarto-dev/quarto-cli/issues/11520)): Book's cover image now escapes lightbox treatment, which was incorrectly applied to it when `lightbox: true` was set in the book's configuration.
22+
1323
## `quarto check`
1424

1525
- ([#11608](https://github.com/quarto-dev/quarto-cli/pull/11608)): Do not issue error message when calling `quarto check info`.
1626

27+
## `typst` Format
28+
29+
- ([#11578](https://github.com/quarto-dev/quarto-cli/issues/11578)): Typst column layout widths use fractional `fr` units instead of percent `%` units for unitless and default widths in order to fill the enclosing block and not spill outside it.
30+
1731
## Lua Filters and extensions
1832

1933
- ([#11526](https://github.com/quarto-dev/quarto-cli/pull/11526)):
2034
General improvements to the style and robustness of Quarto's Lua code.
2135
This also provides a new public function `quarto.utils.is_empty_node`
2236
that allows to check whether a node is empty, i.e., whether it's an
2337
empty list, has no child nodes, and contains no text.
38+
- ([#11699](https://github.com/quarto-dev/quarto-cli/issues/11699)): Fix crash with `video` shortcode inside HTML comments.
39+
- 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.
40+
- Fix `pandoc.mediabag` Lua typings so autocompletions work with the Lua LSP integration.
2441

2542
## Other Fixes and Improvements
2643

44+
- ([#8613](https://github.com/quarto-dev/quarto-cli/issues/8613)): Fix `giscus` color on load to support dark mode (by @kv9898).
45+
- ([#11441](https://github.com/quarto-dev/quarto-cli/issues/11441)): Don't add newlines around shortcodes during processing.
2746
- ([#11643](https://github.com/quarto-dev/quarto-cli/issues/11643)): Improve highlighting of nested code block inside markdown code block, i.e. using ` ```{{python}} ` or ` ```python ` inside ` ````markdown` fenced code block.

src/command/render/filters.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ import { isServerShinyPython } from "../../core/render.ts";
9393
import { pythonExec } from "../../core/jupyter/exec.ts";
9494
import { kTocIndent } from "../../config/constants.ts";
9595
import { isWindows } from "../../deno_ral/platform.ts";
96+
import { tinyTexBinDir } from "../../tools/impl/tinytex-info.ts";
9697

9798
const kQuartoParams = "quarto-params";
9899

@@ -205,6 +206,7 @@ async function quartoEnvironmentParams(_options: PandocOptions) {
205206
return {
206207
"paths": {
207208
"Rscript": await rBinaryPath("Rscript"),
209+
"TinyTexBinDir": tinyTexBinDir(), // will be undefined if no tinytex found and quarto will look in PATH
208210
},
209211
};
210212
}

src/command/render/pandoc.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ export async function runPandoc(
594594
// or by the project as format extras
595595
if (extras[kNotebooks]) {
596596
const documentNotebooks = options.format.render[kNotebookView];
597-
// False means taht the user has explicitely disabled notebooks
597+
// False means that the user has explicitely disabled notebooks
598598
if (documentNotebooks !== false) {
599599
const userNotebooks = documentNotebooks === true
600600
? []

src/command/render/project.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ export async function renderProject(
307307
(projectRenderConfig.options.flags?.clean == true) &&
308308
(projType.cleanOutputDir === true))
309309
) {
310-
// ouptut dir
310+
// output dir
311311
const realProjectDir = normalizePath(context.dir);
312312
if (existsSync(projOutputDir)) {
313313
const realOutputDir = normalizePath(projOutputDir);

src/core/handlers/base.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -405,9 +405,7 @@ export async function expandIncludes(
405405
const newCells: MappedString[] = [];
406406
for (let i = 0; i < mdCells.length; ++i) {
407407
const cell = mdCells[i];
408-
newCells.push(
409-
i === 0 ? cell.sourceVerbatim : mappedConcat(["\n", cell.sourceVerbatim]),
410-
);
408+
newCells.push(cell.sourceVerbatim);
411409
}
412410

413411
await processMarkdownIncludes(newCells, options, filename);
@@ -437,9 +435,7 @@ export async function handleLanguageCells(
437435

438436
for (let i = 0; i < mdCells.length; ++i) {
439437
const cell = mdCells[i];
440-
newCells.push(
441-
i === 0 ? cell.sourceVerbatim : mappedConcat(["\n", cell.sourceVerbatim]),
442-
);
438+
newCells.push(cell.sourceVerbatim);
443439
if (
444440
cell.cell_type === "raw" ||
445441
cell.cell_type === "markdown"
@@ -483,7 +479,6 @@ export async function handleLanguageCells(
483479
(innerLanguageHandler.stage !== "any" &&
484480
innerLanguageHandler.stage !== options.stage)
485481
) { // we're in the wrong stage, so we don't actually do anything
486-
newCells[cell.index] = mappedConcat([newCells[cell.index], "\n"]);
487482
continue;
488483
}
489484
if (
@@ -492,7 +487,6 @@ export async function handleLanguageCells(
492487
) {
493488
// if no handler is present (or a directive was included for something
494489
// that responds to cells instead), we're a no-op
495-
newCells[cell.index] = mappedConcat([newCells[cell.index], "\n"]);
496490
continue;
497491
}
498492
if (innerLanguageHandler.directive === undefined) {

0 commit comments

Comments
 (0)