{#
  This template is rendered by conf.py & Sphinx when building documentation.

  The reST comment below should land in the rendered file, to discourage people
  from editing it instead of this template.
#}

..
   Please, do not edit this file, is is rendered from template-extensions.rst.j2,
   and all your changes would be overwritten.

Template Extensions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

When it comes to creating text documents, like
:ref:`custom_templates` or exporting tests, plans
and stories into ReST or Markdown, tmt relies on the well-known
`Jinja`__ package. All Jinja templating features are supported, and, on
top of `filters`__ and `tests`__ shipped with Jinja, tmt adds several
custom ones.

__ https://palletsprojects.com/p/jinja/
__ https://jinja.palletsprojects.com/en/3.1.x/templates/#filters
__ https://jinja.palletsprojects.com/en/stable/templates/#tests

Filters
------------------------------------------------------------------

{% for filter_name in FILTERS.keys() | sort %}
    {% set filter_callable = FILTERS[filter_name] %}

{{ filter_name }}
{{ '^' * (filter_name | length) }}

{% if filter_callable.__doc__ %}
{{ filter_callable.__doc__ | dedent | trim }}
{% endif %}

{% endfor %}

Tests
------------------------------------------------------------------

{% for test_name in TESTS.keys() | sort %}
    {% set test_callable = TESTS[test_name] %}

{{ test_name }}
{{ '^' * (test_name | length) }}

{% if test_callable.__doc__ %}
{{ test_callable.__doc__ | dedent | trim }}
{% endif %}

{% endfor %}
