feat(glossy): add type-checking

- adds type-checking via the valkyrie package
- fixes handling of groups parameter on #glossary()
- new test for relevant changes
This commit is contained in:
swaits committed 2024-12-16 18:30:09 -07:00
1 parent d2e44f4131
commit 0a87404a18
9 files changed
+112 -10

No files matched your search

@@ -0,0 +1,11 @@
{
"zbuffer": {
"short": "z-bufer",
"long": "the depth buffer"
},
"pbr": {
"short": "PBR",
"long": "physically based rendering",
"group": "abbreviations"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 184 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

+33
View File
@@ -0,0 +1,33 @@
#import "/lib.typ": *
#show: init-glossary.with(json("abbreviations.json"))
Reference: @pbr, @zbuffer
#let t(g) = [
#line(length: 100%)
*TESTING:* `#glossary(groups: ` #repr(g) `)`
#glossary(groups: g)
]
#t("abbreviations") // "string" : str
#t(("abbreviations")) // ("string") : str
#t(("abbreviations",)) // ("string",) : array(str)
#t(("abbreviations","abbreviations")) // ("string","string",) : array(str)
#pagebreak(weak: true)
#t("") // empty string should be the empty group
#t(("")) // empty string should be the empty group
#t(("",)) // empty string should be the empty group
#t(("","")) // empty string should be the empty group
#pagebreak(weak: true)
#t(none) // none should be all groups
#t((none)) // none should be all groups
#pagebreak(weak: true)
#t(("abbreviations",none)) // try to get both groups