Skip to content

Commit

Permalink
Emphasize no spaces around filters pipe
Browse files Browse the repository at this point in the history
  • Loading branch information
malteneuss authored and djc committed Aug 26, 2024
1 parent 15c7ba6 commit 10a4264
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions book/src/filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ Values such as those obtained from variables can be post-processed
using **filters**.
Filters are applied to values using the pipe symbol (`|`) and may
have optional extra arguments in parentheses.
Note that the pipe symbol must not be surrounded by spaces;
otherwise, it will be interpreted as the `BitOr` operator.
Filters can be chained, in which case the output from one filter
is passed to the next.

```
{{ "HELLO"|lower }}
```

**Note that the pipe symbol must not be surrounded by spaces**;
otherwise, it will be interpreted as the `BitOr` operator.

Askama has a collection of built-in filters, documented below, but can also include custom filters.
Additionally, the `json` filter is included in the built-in filters, but is disabled by default.
Enable it with Cargo features (see below for more information).
Expand Down

0 comments on commit 10a4264

Please sign in to comment.