From: Kevin Broch Date: Mon, 29 Apr 2019 18:26:33 +0000 (-0700) Subject: add list filter to make example match output X-Git-Tag: 2.11.0~85^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=98dc54dff420dc85d5e2459cce6cbb5849f1d794;p=thirdparty%2Fjinja.git add list filter to make example match output --- diff --git a/jinja2/filters.py b/jinja2/filters.py index bf5173c1..80bbd606 100644 --- a/jinja2/filters.py +++ b/jinja2/filters.py @@ -284,7 +284,7 @@ def do_unique(environment, value, case_sensitive=False, attribute=None): .. sourcecode:: jinja - {{ ['foo', 'bar', 'foobar', 'FooBar']|unique }} + {{ ['foo', 'bar', 'foobar', 'FooBar']|unique|list }} -> ['foo', 'bar', 'foobar'] The unique items are yielded in the same order as their first occurrence in