raw html
zsx / basic
program
fun main() { imu markup: str = "here's some <strong>html!!!</strong>"; imu paragraph: </> ::= <p>{#html markup}</p>; #render paragraph; }
Normal interpolation escapes its value. {markup} would show the angle brackets as text. You’d see <strong> on screen, not bold text. {#html markup} splices the string in as real markup instead, so <strong> becomes an element and the word renders bold.
This opts out of escaping, so reach for it only with markup you trust. The source binds with imu, its content is fixed at build time, and a mut source is rejected.
#htmltakes static markup. It does not run{expr}interpolation inside the string, and it leaves entities like&undecoded — decode them before they reach#html.