-
want a output with {{ }} like {{(key)}}, how can I keep {{ }} ? args.forEach { key, value in but output comes as: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
In Stencil, Stencil is based on the templating language in Django, which has the same issue. Note that Stencil does not support every feature that Django supports. Anyway, quick solution is |
Beta Was this translation helpful? Give feedback.
In Stencil,
{{ stuff }}
refers to a variable. In your case you're referring to the variable named(key)
.Stencil is based on the templating language in Django, which has the same issue. Note that Stencil does not support every feature that Django supports.
Anyway, quick solution is
{{ '{' }}
to print a{
character. Stencil even has a test for this "case": https://github.com/stencilproject/Stencil/blob/master/Tests/StencilTests/LexerSpec.swift#L129-L140