feat(glossy): Count both mode as first use

A breaking change, by default the `both` mode now counts towards the
first use of a term. This in accordance to the documentation.
(updated in bffe5fdc35fcb67aca188fc0642db5bf23530bcd!)
This commit is contained in:
swaits authored and swaits committed 2025-10-26 16:00:22 -06:00
1 parent f745af74cc
commit a2947f2b7b
5 files changed
+6 -5

No files matched your search

+2
View File
@@ -407,3 +407,5 @@ This project is licensed under the MIT License.
- **Breaking**: In themes, entry.pages now returns an array of linked
page numbers, instead of opaque content. Use `#entry.pages.join(", ")`
in your custom theme to keep the previous behaviour.
- **Breaking**: The `both` mode (previously called modifier) by default
now counts towards the first use of a term.
-1
View File
@@ -259,7 +259,6 @@
let is_first_use = not __is_term_first_used(key, location: here())
let default-count-as-first-use = ("short" not in modifiers // mode is not short
and "long" not in modifiers // mode is not long
and "both" not in modifiers // mode is not both
and (display-text == none or display-text == auto)) // mode is not supplement
let force-count-as-first-use = ("use" in modifiers or "spend" in modifiers)
let force-skip-as-first-use = ("nouse" in modifiers or "nospend" in modifiers)
+2 -2
View File
@@ -32,7 +32,7 @@
[@html:short], [@html:long], [@html:both],
[@css:short], [@css:long], [@css:both],
[@tps:short], [@tps:long], [@tps:both],
[@tps:short], [@tps:long], [@tps:both:nouse],
[@concise:short], [@concise:long], [@concise:both],
[@shortonly:short], [@shortonly:long], [@shortonly:both],
@@ -40,7 +40,7 @@
[@html:short:cap], [@html:long:cap], [@html:both:cap],
[@a:css:short], [@a:css:long], [@a:css:both],
[@tps:short:pl], [@tps:long:pl], [@tps:both:pl],
[@tps:short:pl], [@tps:long:pl], [@tps:both:nouse:pl],
[@concise:a:cap:short], [@concise:a:cap:long], [@concise:a:cap:both],
[@an:shortonly:short], [@an:shortonly:long], [@an:shortonly:both],
)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 652 KiB

After

Width:  |  Height:  |  Size: 135 KiB

+2 -2
View File
@@ -37,7 +37,7 @@
=== `@ShortInHeader:short` = "@ShortInHeader:short"
=== `@LongInHeader:long` = "@LongInHeader:long"
=== `@BothInHeader:both` = "@BothInHeader:both"
=== `@BothInHeader:both:nouse` = "@BothInHeader:both:nouse"
=== `@NormalInHeader` = "@NormalInHeader"
#line(length: 100%)
@@ -47,7 +47,7 @@
#figure([], caption: [`@ShortInCaption:short` = "@ShortInCaption:short"])
#figure([], caption: [`@LongInCaption:long` = "@LongInCaption:long"])
#figure([], caption: [`@BothInCaption:both` = "@BothInCaption:both"])
#figure([], caption: [`@BothInCaption:both:nospend` = "@BothInCaption:both:nospend"])
#figure([], caption: [`@NormalInCaption` = "@NormalInCaption"])
#line(length: 100%)