anticipate a potential fallback for todos

This commit is contained in:
Jean-Marie Mineau 2025-07-07 12:37:53 +02:00
parent cb4317192a
commit acd42c4f62
Signed by: histausse
GPG key ID: B66AEEDA9B645AD2

View file

@ -28,12 +28,18 @@
for t in todo-list.final() {
let l = label(t.first())
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()])
)
if locs.len() >= 1 {
list.item(link(l)[TODO #t.at(1) p.#locs.first().location().page() : #t.last()])
} else {
list.item(link(l)[TODO #t.at(1) p.??? : #t.last()])
}
}
}
}