try replacing locate with query

This commit is contained in:
Jean-Marie Mineau 2025-07-07 10:33:31 +02:00
parent 45934c5fd2
commit cb4317192a
Signed by: histausse
GPG key ID: B66AEEDA9B645AD2

View file

@ -27,7 +27,13 @@
text(size: 2em, weight: "bold", fill:red)[TO-DOs]
for t in todo-list.final() {
let l = label(t.first())
list.item(link(l)[TODO #t.at(1) p.#locate(l).page() : #t.last()])
let locs = query(l)
assert(
locs.len() >= 1,
message: "todo '" + t.first() + "' not found: " +
repr(t.last()) + " (query(" + repr(l) + ") = " + repr(locs) + ")"
)
list.item(link(l)[TODO #t.at(1) p.#locs.first().location().page() : #t.last()])
}
}
}