Skip to content

Commit a65b9ed

Browse files
cdervgithub-actions[bot]
authored andcommitted
release notes - Escape shortcodes in changelog files when importing them as render target in quarto-web
(cherry picked from commit f92d3ca)
1 parent 6d95693 commit a65b9ed

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

docs/download/changelog/1.3/_changelog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
## Jupyter Notebooks
2929

30-
- Add support for embedding cell outputs in quarto documents using `{{< embed >}}`. You can address cells by Id, Tag, or label, such as `{{< embed mynotebook.ipynb#fig-output >}}` which would embed the output of a cell with the label `fig-output`). You can also provide a list of ids like `{{< embed mynotebook.ipynb#fig-output,tbl-out >}}`.
30+
- Add support for embedding cell outputs in quarto documents using `{{{< embed >}}}`. You can address cells by Id, Tag, or label, such as `{{{< embed mynotebook.ipynb#fig-output >}}}` which would embed the output of a cell with the label `fig-output`). You can also provide a list of ids like `{{{< embed mynotebook.ipynb#fig-output,tbl-out >}}}`.
3131
- Only attempt to postprocess `text/plain` output if it's nonempty ([#3896](https://github.com/quarto-dev/quarto-cli/issues/3896)).
3232
- Fix output of bokeh plots so the right number of cells is generated ([#2107](https://github.com/quarto-dev/quarto-cli/issues/2107)).
3333
- Fix output of code cells that contain triple backticks (or more) ([#3179](https://github.com/quarto-dev/quarto-cli/issues/3179)).

docs/download/changelog/1.5/_changelog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@
260260
- ([#9727](https://github.com/quarto-dev/quarto-cli/issues/9727)): `lightbox`: do not overwrite `window.onload` events.
261261
- ([#9792](https://github.com/quarto-dev/quarto-cli/issues/9798)): Fix a 1.5 regression where `freeze` would be accidentally triggered in single-file renders.
262262
- ([#10003](https://github.com/quarto-dev/quarto-cli/issues/10003)): fix Giscus light/dark theme YAML example in schema where `theme` is missing.
263-
- Add support for `{{< lipsum >}}` shortcode, which is useful for emitting placeholder text. Provide a specific number of paragraphs (`{{< lipsum 3 >}}`).
263+
- Add support for `{{{< lipsum >}}}` shortcode, which is useful for emitting placeholder text. Provide a specific number of paragraphs (`{{{< lipsum 3 >}}}`).
264264
- Resolve data URIs in Pandoc's mediabag when rendering documents.
265265
- Increase v8's max heap size by default, to avoid out-of-memory errors when rendering large documents (also cf. https://github.com/denoland/deno/issues/18935).
266266
- When running `quarto check` from a development build (from a git repository), show the git commit hash in addition to the version string.

tools/release-notes.R

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,17 @@ cat("Prerelease:", new_release_major, "->", new_prerelease_major, "\n")
4949
changelog_url <- paste0("https://github.com/quarto-dev/quarto-cli/releases/download/v",
5050
old_release, "/changelog.md")
5151
changelog_dir <- dir_create(path(downloads, "changelog", major_version))
52+
changelog_file <- path(changelog_dir, "_changelog", ext = "md")
5253

53-
download_status <- download.file(changelog_url, path(changelog_dir,
54-
"_changelog", ext = "md"))
54+
download_status <- download.file(changelog_url, changelog_file)
5555
stopifnot(!download_status)
5656

57+
# escape shortcodes on changelog files as we don't want them processed on website
58+
# changelog.md is not supposed to have shortcodes that are meant to be resolved as they
59+
# are not .qmd files, but regular markdown files.
60+
# # Pattern that matches {{< >}} but NOT {{{< >}}} (already escaped): "(?<!\\{)(\\{\\{<[^>]*>\\}\\})(?!\\})"
61+
xfun::gsub_file(changelog_file, pattern = "(?<!\\{)(\\{\\{<[^>]*>\\}\\})(?!\\})", replacement = "{\\1}", perl = TRUE)
62+
5763
glue("
5864
---
5965
title: {major_version} Release Notes

0 commit comments

Comments
 (0)