-
Notifications
You must be signed in to change notification settings - Fork 393
fix(license.lua): correct license metadata lua processing #13832
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
cderv
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the change!
Honestly, I don't think this is a typo - text was just not set initially.
Then it was added for the typescript part in #6784.
So this change is an improvement to make inline CC license having a default text, exactly like with the appendix part.
This is good ! Another oversight is the the support for CC0 that was added only on the TS part too: #10763
---
format: html
license: "CC0"
---
License: {{< meta license.text >}}
so it won't be CC0 1.0 like the link

Also, I checked the template for which those meta are used. I think this is fine to add such text. Only JATS seems to use this licence in template. And <license-p> seems to support this text for CC too https://jats.nlm.nih.gov/publishing/tag-library/1.3/element/license-p.html
|
FWIW, the context was for my Typst template, I wanted to show license/copyright, but this prevented it and generally it prevented anyone to use it as part of their template. |
|
Thanks for the context, that it helpful to understand ! I'll merge this today |
|
And yes, CC0 is not accounted for as it would require more thinking and possibly refactoring to move it to Lua with other license processing. Maybe worth opening an enhancement issue for "future"? |
|
The typo I was referring to is (the brackets should not be there): The other changes are only for CC licenses. |
Correct the processing of license metadata to ensure proper handling of inline license elements.
The typo prevented from using
license.textin template/partials/shortcodes whenlicense: "my license"was used.Note that version is not added to "text" for CC0 licenses because for some reason, the URL/parsing is created in TypeScript for this license.