Skip to content

Commit

Permalink
[fix] use str instead of repr to convert type to string
Browse files Browse the repository at this point in the history
  • Loading branch information
Mc-Zen committed Dec 28, 2024
1 parent 6ea757e commit 565344a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/assert.typ
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#let assert-mark(mark, kind: "tip") = {
assert(type(mark) == function, message: "Invalid arrow " + kind + ", expected a function but got a " + repr(type(mark)) + ". Ensure that you use e.g. `stealth.with(..)` instead of directly writing `stealth(..)`")
assert(type(mark) == function, message: "Invalid arrow " + kind + ", expected a function but got a " + str(type(mark)) + ". Ensure that you use e.g. `stealth.with(..)` instead of directly writing `stealth(..)`")
}

#let assert-dict-keys(dict, required: (), optional: ()) = {
Expand Down
2 changes: 1 addition & 1 deletion src/path.typ
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
assert(false, message: "Unexpected named argument \"" + args.named().keys().first() + "\"")
}
stroke = std.stroke(stroke)
assert(type(shorten) in (ratio, dictionary), message: "Expected ratio or dictionary for parameter `shorten`, found " + repr(type(shorten)))
assert(type(shorten) in (ratio, dictionary), message: "Expected ratio or dictionary for parameter `shorten`, found " + str(type(shorten)))
if type(shorten) == ratio {
shorten = (start: shorten, end: shorten)
} else if type(shorten) == dictionary {
Expand Down

0 comments on commit 565344a

Please sign in to comment.