aboutsummaryrefslogtreecommitdiffstats
path: root/book/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--book/src/filters.md18
1 files changed, 18 insertions, 0 deletions
diff --git a/book/src/filters.md b/book/src/filters.md
index e85068f..ea8198a 100644
--- a/book/src/filters.md
+++ b/book/src/filters.md
@@ -21,6 +21,7 @@ but are disabled by default. Enable them with Cargo features (see below for more
* **[Built-in filters][#built-in-filters]:**
[`abs`][#abs],
+ [`as_ref`][#as_ref],
[`capitalize`][#capitalize],
[`center`][#center],
[`escape|e`][#escape],
@@ -62,6 +63,23 @@ Output:
2
```
+### as_ref
+[#as_ref]: #as_ref
+
+Creates a reference to the given argument.
+
+```
+{{ "a"|as_ref }}
+{{ self.x|as_ref }}
+```
+
+will become:
+
+```
+&a
+&self.x
+```
+
### capitalize
[#capitalize]: #capitalize