Skip to content

Commit

Permalink
mark: Add assertion messages
Browse files Browse the repository at this point in the history
  • Loading branch information
johannes-wolf committed Dec 23, 2023
1 parent e03ab16 commit c357bda
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/mark.typ
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@
}
vector.sub(pt, vector.scale(vector.norm(dir), distance * if is-end { 1 } else { -1 }))
}
assert.ne(pos, none)
assert.ne(pos, none,
message: "Could not determine mark position")

let dir = if style.flex {
let a = pos
Expand Down Expand Up @@ -224,7 +225,8 @@
vector.scale(dir, if is-end { -1 } else { 1 })
}
}
assert.ne(dir, none)
assert.ne(pos, none,
message: "Could not determine mark direction")

mark = transform-mark(
style,
Expand Down

0 comments on commit c357bda

Please sign in to comment.