added: auto grouping for glossary
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 24s Details

This commit is contained in:
Sven Vogel 2024-07-08 14:50:07 +02:00
parent c06fecec4c
commit dfb2cdbebe
2 changed files with 16 additions and 4 deletions

View File

@ -46,7 +46,21 @@
type(v.group) == str,
message: "The optional group of glossary entry `" + k + "` is not a string")
} else {
panic("Missing group for glossary entry: `" + k + "`")
let group = if "long" in v {
if (context text.lang) == "de" {
"Akronym"
} else {
"Acronym"
}
} else {
if (context text.lang) == "de" {
"Begriff"
} else {
"Term"
}
}
entries.at(k).group = group
}
}

View File

@ -3,9 +3,7 @@ oidc:
short: OIDC
long: OpenID Connect
desc: "OpenID is an open standard and decentralized authentication protocol promoted by the non-profit #link(\"https://en.wikipedia.org/wiki/OpenID#OpenID_Foundation\")[OpenID Foundation]."
group: Acronym
potato:
short: potato
desc: "#lorem(50)"
group: Acronym