aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2025-10-04 19:25:34 +0200
committerJohn MacFarlane <[email protected]>2025-10-04 19:26:59 +0200
commit9d452f801de75d509d78497c5523498c478203cc (patch)
tree08c1e9a0e734cc1c25055c134da0e5e6f09dd9fd
parentc66553c76b82cf0c3235b07c71ea8c627d4b6484 (diff)
Typst template: fix 3.8 regression in which links disappear.
A template change in 3.8 added a show rule for links which causes them to disappear except in special cases. This change fixes the problem. Closes #11194.
-rw-r--r--data/templates/template.typst2
-rw-r--r--test/writer.typst2
2 files changed, 4 insertions, 0 deletions
diff --git a/data/templates/template.typst b/data/templates/template.typst
index eec6d8261..749ecb007 100644
--- a/data/templates/template.typst
+++ b/data/templates/template.typst
@@ -67,6 +67,8 @@
show link: this => {
if filecolor != none and type(this.dest) == label {
text(this, fill: rgb(content-to-string(filecolor)))
+ } else {
+ text(this)
}
}
diff --git a/test/writer.typst b/test/writer.typst
index 8b30a3bf5..4e3b4a56e 100644
--- a/test/writer.typst
+++ b/test/writer.typst
@@ -91,6 +91,8 @@
show link: this => {
if filecolor != none and type(this.dest) == label {
text(this, fill: rgb(content-to-string(filecolor)))
+ } else {
+ text(this)
}
}