diff options
author | vallentin <mail@vallentin.dev> | 2021-01-06 22:37:35 +0100 |
---|---|---|
committer | Christian Vallentin <vallentinsource@gmail.com> | 2021-01-06 23:08:11 +0100 |
commit | 2dd88e8a9bb83b4ad71c58c48642bab274b3c62a (patch) | |
tree | 232f6f350ded8fdee827eeb9760449baa1d7b62a /book/src | |
parent | b90dc8cd2dcd259a4d0d8798d276bf28fc90931c (diff) | |
download | askama-2dd88e8a9bb83b4ad71c58c48642bab274b3c62a.tar.gz askama-2dd88e8a9bb83b4ad71c58c48642bab274b3c62a.tar.bz2 askama-2dd88e8a9bb83b4ad71c58c48642bab274b3c62a.zip |
Added abs filter to book
Diffstat (limited to 'book/src')
-rw-r--r-- | book/src/filters.md | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/book/src/filters.md b/book/src/filters.md index db660a2..fd55898 100644 --- a/book/src/filters.md +++ b/book/src/filters.md @@ -18,6 +18,20 @@ but are disabled by default. Enable them with Cargo features (see below for more ## Built-In Filters +### abs + +Returns the absolute value. + +``` +{{ -2|abs }} +``` + +Output: + +``` +2 +``` + ### capitalize Capitalize a value. The first character will be uppercase, all others lowercase: |