<span class="xml"></span><span class="hljs-template_tag">{% <span class="hljs-keyword">if</span> posts<span class="hljs-filter">|<span class="hljs-keyword">length</span></span> %}</span><span class="xml">
  </span><span class="hljs-template_tag">{% <span class="hljs-keyword">for</span> article in articles %}</span><span class="xml">
  &amp;lt;div&amp;gt;
  </span><span class="hljs-variable">{{ article.title<span class="hljs-filter">|<span class="hljs-keyword">upper</span></span>() }}</span><span class="xml">

  </span><span class="hljs-comment">{# outputs 'WELCOME' #}</span><span class="xml">
  &amp;lt;/div&amp;gt;
  </span><span class="hljs-template_tag">{% <span class="hljs-keyword">endfor</span> %}</span><span class="xml">
</span><span class="hljs-template_tag">{% <span class="hljs-keyword">endif</span> %}</span><span class="xml">

</span><span class="hljs-template_tag">{% <span class="hljs-keyword">set</span> user = json_encode(user) %}</span><span class="xml">

</span><span class="hljs-variable">{{ <span class="hljs-function"><span class="hljs-keyword">random</span><span class="hljs-params">(['apple', 'orange', 'citrus'])</span></span> }}</span><span class="xml">

</span><span class="hljs-variable">{{ <span class="hljs-function"><span class="hljs-keyword">include</span><span class="hljs-params">(template_from_string("Hello {{ name }}")</span></span>) }}</span><span class="xml">


</span><span class="hljs-comment">{#
Comments may be long and multiline.
Markup is &amp;lt;em&amp;gt;not&amp;lt;/em&amp;gt; highlighted within comments.
#}</span><span class="xml">
</span>