mirror of
https://0xacab.org/anarsec/anarsec.guide.git
synced 2025-07-23 23:01:04 -04:00
typst glossary bug
This commit is contained in:
parent
679f46f7c6
commit
7decaf8359
3 changed files with 20 additions and 15 deletions
|
@ -85,6 +85,7 @@
|
|||
outline(indent: 20pt, depth: 2)
|
||||
|
||||
// format links
|
||||
let glossaryFootnote = state("x", [#footnote[anarsec.guide/glossary]<glossary-footnote>])
|
||||
show link: it => {
|
||||
it.body
|
||||
if type(it.dest) == "string" {
|
||||
|
@ -102,12 +103,13 @@
|
|||
}
|
||||
else if it.dest.starts-with("/glossary#") or it.dest.starts-with("/glossary/#") {
|
||||
context {
|
||||
let elements = query(heading.where(label: label(it.dest.trim("/glossary#", at: start).trim("/glossary/#", at: start)), level: 2))
|
||||
let elements = query(heading.where(label: label(it.dest.trim("/glossary#", at: start).trim("/glossary/#", at: start))))
|
||||
if elements.len() != 0 {
|
||||
text[#super[†]]
|
||||
}
|
||||
else {
|
||||
footnote[anarsec.guide/glossary]
|
||||
context glossaryFootnote.get()
|
||||
glossaryFootnote.update(x => footnote(<glossary-footnote>))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue