diff docs/introduction.rst @ 723:c17a4e30ebbf

Docs for nested filters
author Franz Glasner <f.glasner@feldmann-mg.com>
date Wed, 16 Aug 2023 17:04:14 +0200
parents a8bcb22341cd
children 11e24e1bbf20
line wrap: on
line diff
--- a/docs/introduction.rst	Wed Aug 16 16:28:42 2023 +0200
+++ b/docs/introduction.rst	Wed Aug 16 17:04:14 2023 +0200
@@ -518,6 +518,31 @@
 return with :py:obj:`None` or an empty string.
 
 
+Nested Interpolation (Filtering Only)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Generally, nested interpolation does *not* work. Something like
+``{{{{variable}}}}`` does not work.
+
+Also something like ``{{{{path-variable|Empty}}/subdir|normpath}}`` does not
+work as expected: `path-variable` would not get interpolated and `Empty`
+not be applied.
+
+But -- as a special case -- a simplified form of nested evaluation is
+implemented for filters only. Instead of using the start tag ``{{`` and end
+tag ``}}`` it uses the special start tag ``{{|`` and end tag ``|}}``.
+
+
+With the syntax::
+
+      {{|<expression with variables>|filter1[,filter2...]|}}
+
+The expression above can be expressed as
+``{{|{{path-variable|Empty}}/subdir|normpath|}}``
+and yields the expected result -- with `normpath` applied to the now
+interpolated expression.
+
+
 Examples
 ~~~~~~~~