fix(glossy): Ensure ∅ supplement results in ∅ content

Ensure an empty supplement results in glossy returning empty content,
instead of an empty string. Done by returning #none if no article is
wanted.

When the value #none is returned for the article, this can neatly join
with the other values without a trace. In particular, when `term` is
empty content, this ensures that only #metadata remains, exactly like
in the 'hidden' case.

Effectively, now @term[] is identical to @term:hidden, because no empty
string is inserted. This can be seen in the updated test case, where the
spaces around the blank term are now collapsed to a single space by
Typst, instead of keeping two spaces like before.

A next commit will remove :hidden, since it's not orthogonal w.r.t.
other modifiers, while using a supplement is.
This commit is contained in:
swaits authored and swaits committed 2025-10-26 16:00:21 -06:00
1 parent 3e0d7a9812
commit 392e8a8122
2 files changed
+3 -3

No files matched your search

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 KiB

After

Width:  |  Height:  |  Size: 27 KiB