From 5cfc40010c2a44a98a04102e53fb3098f2740590 Mon Sep 17 00:00:00 2001 From: Uwe Fladrich Date: Tue, 5 Nov 2024 13:59:23 +0100 Subject: [PATCH] Some fixes in the documentation --- docs/sphinx/scripts.rst | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/sphinx/scripts.rst b/docs/sphinx/scripts.rst index fb398a7..0a3764d 100644 --- a/docs/sphinx/scripts.rst +++ b/docs/sphinx/scripts.rst @@ -442,17 +442,20 @@ Other filters render Renders the expression (e.g. a variable) with Jinja2 and the current context. This can be used, for - example, to explicitly render context parameters that have been set with the `!noparse` tag:: + example, to explicitly render context parameters that have been set with the ``!noparse`` tag:: - base.context: foo: me bar: !noparse "{{ foo }}" - - when "{{ bar|render == 'me' }}" + - when: "{{ bar|render == 'me' }}" base.echo: msg: "It is {{ bar }}!" - Without using the `render` filter in the example, the `when` clause would evaluate to `false` because - the value of `bar` would still be `"{{ foo }}"` because of `!noparse`. + Without using the ``render`` filter in the example, the ``when`` clause would evaluate to ``false`` + because the value of ``bar`` would still be ``"{{ foo }}"`` as a consequence of ``!noparse``. + +.. versionadded:: 1.1 + ``render`` filter added. .. _PyYAML: https://pyyaml.org