Skip to content

Commit

Permalink
Mention whitespace control in expressions and comments (#919)
Browse files Browse the repository at this point in the history
* Mention whitespace control in expressions

* Mention whitespace control with comments too
  • Loading branch information
uncenter authored May 24, 2024
1 parent 3b2e96f commit 15b6609
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/content/docs/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,8 @@ would be rendered as `Hello {{ name }}`.
### Whitespace control

Tera comes with easy to use whitespace control: use `{%-` if you want to remove all whitespace
before a statement and `-%}` if you want to remove all whitespace after.
before a statement and `-%}` if you want to remove all whitespace after. This behavior also
works with expressions, using `{{-` and `-}}`, and with comments, using `{#-` and `-#}`.

For example, let's look at the following template:

Expand Down

0 comments on commit 15b6609

Please sign in to comment.