Skip to content

Commit

Permalink
Fix outdated message on missing anchor
Browse files Browse the repository at this point in the history
  • Loading branch information
tingerrr committed Apr 30, 2024
1 parent 3c90a4f commit ce166d2
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/core.typ
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,9 @@
#let locate-last-anchor(ctx) = {
let starting-locs = query(selector(ctx.anchor).before(here()))

let message = (
"No `anchor()` found while searching from outside the page header, did you forget to set",
"`paper`/`page-size` or `top-margin`?",
).join(" ")

assert.ne(starting-locs.len(), 0, message: message)
assert.ne(starting-locs.len(), 0,
message: "No `anchor()` found while searching from outside the page header",
)

let anchor = starting-locs.last().location()

Expand Down

0 comments on commit ce166d2

Please sign in to comment.