#Condition evaluation in template

1 messages · Page 1 of 1 (latest)

eager spindle
#

Hello everyone.
I'm getting an unexpected behavior when evaluating a condition or more possibly I'm doing something wrong.
Basically, I want my letter template to add certain closing content depending on the value supplied.
Typst project: https://typst.app/project/ri_qtZr768Fr6oMDEZk_3_

vocal hearth
#

?r ```
#type([A])

#type("A")

snow plazaBOT
vocal hearth
#

there's your problem

vocal hearth
#

to be clearer: [A] isn't equal to "A", so you will either have to write closing: "A", or compare against [A]

#

[A] is a markup block, you can add elements to it, e.g. [*bold* _italics_], but a string isnt markup so "*bold* _italics_" will render with literal asterisks and underlines