changed formatter

This commit is contained in:
vky 2026-08-16 14:38:06 +02:00
parent a6923d9aa9
commit 5902b7563a
2 changed files with 8 additions and 12 deletions

View File

@ -1,5 +1,6 @@
#import "../../setup/setup.typ": gls, nogls, ravhelp
= Introduction
@fk_draan:short.

View File

@ -17,7 +17,6 @@
yaml(file).map(entry => {
let result = (:)
// ----- Convert each YAML field to its Typst representation -----
for (key, value) in entry {
result.insert(
key,
@ -46,14 +45,6 @@
)
}
// ----- Fill in missing optional fields -----
if "short" not in result {
result.insert("short", none)
}
if "sort" not in result {
result.insert("sort", result.long)
}
result
})
}
@ -62,7 +53,6 @@
#let read-glossary(files) = {
let entries = ()
// ----- Normalize a single file into an array -----
if type(files) != array {
files = (files,)
}
@ -70,13 +60,18 @@
for file in files {
let new = read-glossary-entries(file)
// ----- Reject duplicate glossary keys -----
for entry in new {
let duplicate = entries.find(e => e.key == entry.key)
if duplicate != none {
panic(
"Found duplicate key `" + entry.key + "` in files `" + file + "`",
"Found duplicate key `"
+ entry.key
+ "` in files `"
+ file
+ "` and `"
+ duplicate.file
+ "`",
)
}
}