lang HTML: HEADER := $HTML{}"" func escape(t:Text)->HTML: t = t:replace("&", "&") t = t:replace("<", "<") t = t:replace(">", ">") t = t:replace('"', """) t = t:replace("'", "'") return HTML.from_unsafe_text(t) func escape_int(i:Int)->HTML: return HTML.from_unsafe_text("{i}") func paragraph(content:HTML)->HTML: return $HTML{}"

{content}

" func main(): >> HTML.HEADER = $HTML"" >> user := "I <3 hax" >> html := $HTML{}"Hello {user}!" = $HTML"Hello I <3 hax!" >> html ++ $HTML{}"
" = $HTML"Hello I <3 hax!
" >> $HTML{}"{1 + 2}" = $HTML"3" >> $HTML{}"{3_i8}" = $HTML"3" >> html:paragraph() = $HTML"

Hello I <3 hax!

"