Allow concise entry definition

closes #13
This commit is contained in:
Philipp Niedermayer committed 2024-12-15 19:32:27 +00:00
1 parent f4b7cc1374
commit 91de1816e9
2 files changed
+9 -3

No files matched your search

+5 -2
View File
@@ -21,7 +21,10 @@
// - If 'short' value is not a string
// - If 'short' value is an empty string
//
#let __normalize_entry(entry) = {
#let __normalize_entry(key, entry) = {
if (type(entry) == str){
entry = (short: key, long: entry)
}
// Validate required fields
if not "short" in entry {
panic("Entry must contain a 'short' key")
@@ -329,7 +332,7 @@
// Process and store each glossary entry
for (key, entry) in entries {
__add_entry(key, __normalize_entry(entry))
__add_entry(key, __normalize_entry(key, entry))
}
// Set up reference handling for glossary terms