Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/changelog-1.9.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
8 changes: 6 additions & 2 deletions src/resources/filters/modules/license.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -159,7 +163,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

Expand Down
12 changes: 12 additions & 0 deletions tests/docs/smoke-all/2025/12/28/license-CC.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
format: html
license: "CC BY"
_quarto:
tests:
html:
ensureFileRegexMatches:
-
- "License: CC BY 4.0"
---

License: {{< meta license.text >}}
12 changes: 12 additions & 0 deletions tests/docs/smoke-all/2025/12/28/license-CC0.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
format: html
license: "CC0"
_quarto:
tests:
html:
ensureFileRegexMatches:
-
- "License: CC0"
---

License: {{< meta license.text >}}
16 changes: 16 additions & 0 deletions tests/docs/smoke-all/2025/12/28/license-copyright-inline.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
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 >}}
Loading