From 2dc978f382614621b32ff437714400ead6e13a60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Canouil?= <8896044+mcanouil@users.noreply.github.com> Date: Sun, 28 Dec 2025 13:26:05 +0100 Subject: [PATCH 1/6] fix: correct license metadata processing --- src/resources/filters/modules/license.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/resources/filters/modules/license.lua b/src/resources/filters/modules/license.lua index 4741e9003ec..698a0ba2ab7 100644 --- a/src/resources/filters/modules/license.lua +++ b/src/resources/filters/modules/license.lua @@ -159,7 +159,7 @@ local function processLicenseMeta(meta) end meta[constants.kLicense] = normalizedEls elseif pandoc.utils.type(licenseMeta) == "Inlines" then - meta[constants.kLicense] = {processLicense(licenseMeta, meta)} + meta[constants.kLicense] = processLicense(licenseMeta, meta) end end From 6c2bbb1120e2a0dea186f05ee613b7a36d9b6573 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Canouil?= <8896044+mcanouil@users.noreply.github.com> Date: Sun, 28 Dec 2025 13:44:10 +0100 Subject: [PATCH 2/6] test: add license and copyright metadata test --- .../2025/12/28/license-copyright-inline.qmd | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/docs/smoke-all/2025/12/28/license-copyright-inline.qmd diff --git a/tests/docs/smoke-all/2025/12/28/license-copyright-inline.qmd b/tests/docs/smoke-all/2025/12/28/license-copyright-inline.qmd new file mode 100644 index 00000000000..db37d171730 --- /dev/null +++ b/tests/docs/smoke-all/2025/12/28/license-copyright-inline.qmd @@ -0,0 +1,15 @@ +--- +format: html +license: "Whatever" +copyright: "2024 My Company" +_quarto: + tests: + html: + ensureFileRegexMatches: + - ['License: Whatever'] + - ['Copyright: 2024 My Company'] +--- + +License: {{< meta license.text >}} + +Copyright: {{< meta copyright.statement >}} From 9141d75001cee5617f8515e9d20a6c499f3425a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Canouil?= <8896044+mcanouil@users.noreply.github.com> Date: Sun, 28 Dec 2025 13:48:52 +0100 Subject: [PATCH 3/6] chore: add change log entry --- news/changelog-1.9.md | 1 + 1 file changed, 1 insertion(+) diff --git a/news/changelog-1.9.md b/news/changelog-1.9.md index 752babea7a0..e1553844e67 100644 --- a/news/changelog-1.9.md +++ b/news/changelog-1.9.md @@ -103,3 +103,4 @@ All changes included in 1.9: - ([#13528](https://github.com/quarto-dev/quarto-cli/pull/13528)): Adds support for table specification using nested lists and the `list-table` class. - ([#13575](https://github.com/quarto-dev/quarto-cli/pull/13575)): Improve CPU architecture detection/reporting in macOS to allow quarto to run in virtualized environments such as OpenAI's `codex`. - ([#13656](https://github.com/quarto-dev/quarto-cli/issues/13656)): Fix R code cells with empty `lang: ""` option producing invalid markdown class attributes. +- ([#13832](https://github.com/quarto-dev/quarto-cli/pull/13832)): Fix typo that prevented the `license.text` metadata from being set correctly when using an inline license. (author: @mcanouil) From ec4ceb64290387f4483526015416cdf46226d3f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Canouil?= <8896044+mcanouil@users.noreply.github.com> Date: Sun, 28 Dec 2025 14:27:07 +0100 Subject: [PATCH 4/6] test: fix pattern matching for license and copyright metadata --- tests/docs/smoke-all/2025/12/28/license-copyright-inline.qmd | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/docs/smoke-all/2025/12/28/license-copyright-inline.qmd b/tests/docs/smoke-all/2025/12/28/license-copyright-inline.qmd index db37d171730..f4966c4c168 100644 --- a/tests/docs/smoke-all/2025/12/28/license-copyright-inline.qmd +++ b/tests/docs/smoke-all/2025/12/28/license-copyright-inline.qmd @@ -6,8 +6,9 @@ _quarto: tests: html: ensureFileRegexMatches: - - ['License: Whatever'] - - ['Copyright: 2024 My Company'] + - + - "License: Whatever" + - "Copyright: 2024 My Company" --- License: {{< meta license.text >}} From ff654c136757927d71faeb87a635621b78d41569 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Canouil?= <8896044+mcanouil@users.noreply.github.com> Date: Sun, 28 Dec 2025 14:47:38 +0100 Subject: [PATCH 5/6] fix: ensure CC licenses also gets "text" metadata --- src/resources/filters/modules/license.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/resources/filters/modules/license.lua b/src/resources/filters/modules/license.lua index 698a0ba2ab7..5caf3b69e87 100644 --- a/src/resources/filters/modules/license.lua +++ b/src/resources/filters/modules/license.lua @@ -83,10 +83,14 @@ local function processLicense(el, meta) if ccLicense ~= nil then local license = licenses[ccLicense.base] if license ~= nil then + local licenseText = '' + if ccLicense.base and ccLicense.base ~= '' and ccLicense.version and ccLicense.version ~= '' then + licenseText = ccLicense.base:upper() .. ' ' .. ccLicense.version + end return { type = pandoc.Inlines(license.type), url = pandoc.Inlines(license.licenseUrl(meta.lang, ccLicense.version)), - text = pandoc.Inlines('') + text = pandoc.Inlines(licenseText) } end end From 0e5964c25181e681da6ed1f34d57a26bb663809e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Canouil?= <8896044+mcanouil@users.noreply.github.com> Date: Sun, 28 Dec 2025 14:49:31 +0100 Subject: [PATCH 6/6] test: add CC tests --- tests/docs/smoke-all/2025/12/28/license-CC.qmd | 12 ++++++++++++ tests/docs/smoke-all/2025/12/28/license-CC0.qmd | 12 ++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 tests/docs/smoke-all/2025/12/28/license-CC.qmd create mode 100644 tests/docs/smoke-all/2025/12/28/license-CC0.qmd diff --git a/tests/docs/smoke-all/2025/12/28/license-CC.qmd b/tests/docs/smoke-all/2025/12/28/license-CC.qmd new file mode 100644 index 00000000000..2490865476a --- /dev/null +++ b/tests/docs/smoke-all/2025/12/28/license-CC.qmd @@ -0,0 +1,12 @@ +--- +format: html +license: "CC BY" +_quarto: + tests: + html: + ensureFileRegexMatches: + - + - "License: CC BY 4.0" +--- + +License: {{< meta license.text >}} diff --git a/tests/docs/smoke-all/2025/12/28/license-CC0.qmd b/tests/docs/smoke-all/2025/12/28/license-CC0.qmd new file mode 100644 index 00000000000..029cf569481 --- /dev/null +++ b/tests/docs/smoke-all/2025/12/28/license-CC0.qmd @@ -0,0 +1,12 @@ +--- +format: html +license: "CC0" +_quarto: + tests: + html: + ensureFileRegexMatches: + - + - "License: CC0" +--- + +License: {{< meta license.text >}}