Template delimiters
Square bracket LDML tags, processing instruction tags, and expression tags invoke LaiRu inside literal output.
Target
Plain text is output as written until a LaiRu delimiter is encountered. The square bracket form is compact and common in legacy templates. The processing-instruction form is useful in HTML, XML, JavaScript, and CSS files where literal square brackets may appear often. The expression form writes a single expression result directly into the output stream.
A code block can open in one tag, emit literal text, and resume in a later tag. That pattern is how templates keep HTML structure readable while still using conditionals and loops.
Place [no_square_brackets] outside any tag to treat later square brackets as ordinary text in that file. After that point, use processing-instruction delimiters for server-side code.
Examples
Working pattern
1[if(web_request->param('ok')) => {]2<p>Ready</p>3[else]4<p>Not ready</p>5[}]Square bracket code block inside HTML
1<ul>2[with name in array('Ada', 'Grace') do => {]3 <li>[#name->encodeHtml]</li>4[}]5</ul>Processing instruction block
1<?lasso2local(title) = 'Status'3local(ok) = true4?>5<h1><?= #title->encodeHtml ?></h1>6<?lasso if(#ok) => { ?>7<p>Ready</p>8<?lasso } ?>Expression delimiter for a single value
1<p>Rendered at <?= date->format('%Y-%m-%d %H:%M:%S') ?></p>Disable square bracket parsing for the rest of a file
1[no_square_brackets]2<script>3 const names = ['Ada', 'Grace'];4</script>5<?lasso6// Use PI delimiters after square brackets have been disabled.7'done'8?>
If a page has a lot of JavaScript array literals, put [no_square_brackets] before the script section and use PI delimiters for any later server-side values.