Skip to content

Commit ff654c1

Browse files
committed
fix: ensure CC licenses also gets "text" metadata
1 parent ec4ceb6 commit ff654c1

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎src/resources/filters/modules/license.lua‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,14 @@ local function processLicense(el, meta)
8383
if ccLicense ~= nil then
8484
local license = licenses[ccLicense.base]
8585
if license ~= nil then
86+
local licenseText = ''
87+
if ccLicense.base and ccLicense.base ~= '' and ccLicense.version and ccLicense.version ~= '' then
88+
licenseText = ccLicense.base:upper() .. ' ' .. ccLicense.version
89+
end
8690
return {
8791
type = pandoc.Inlines(license.type),
8892
url = pandoc.Inlines(license.licenseUrl(meta.lang, ccLicense.version)),
89-
text = pandoc.Inlines('')
93+
text = pandoc.Inlines(licenseText)
9094
}
9195
end
9296
end

0 commit comments

Comments
 (0)