← how-to

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.

#html takes static markup. It does not run {expr} interpolation inside the string, and it leaves entities like &amp; undecoded — decode them before they reach #html.

reachout

echo -n 'dGhlQGNvbXBpbG9yZHMuaG91c2U=' | base64 --decode

For humans: faq.

For Ai agents: llms.txt (curated index) and llms-full.txt (full docs).

Privacy: No cookies, no ads, no tracking. It's like you were never here.