Commit bdef309

HPCesia <me@hpcesia.com>
2026-02-09 17:02:14
Fix missing `context` when using `target()`
1 parent 40f19bc
Changed files (2)
src
contents
src/contents/_lib/templates/footnote.typ
@@ -1,5 +1,5 @@
 #let side-footnote(body) = {
-  show footnote: it => {
+  show footnote: it => context {
     if target() == "html" {
       let number = counter(footnote).display(it.numbering)
       let fn-id = "fn-" + number
src/contents/_lib/templates/heading.typ
@@ -1,9 +1,9 @@
 #import "../utils/slugger.typ": slugger
 
-#let auto-reslugify-headings(body) = {
+#let auto-reslugify-headings(body) = context {
   if target() == "html" {
     let headings-slug-record = state("headings-slug-record", (:))
-    show heading: it => context {
+    show heading: it => {
       let record = headings-slug-record.get()
       let ((slug,), record) = slugger(it.body, record: record)
       slug = "heading-" + slug