mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-09 08:56:47 +00:00
Added additional example to min/max doc
This commit is contained in:
@@ -15,5 +15,6 @@ When called with a mapping, max ignores keys and only compares values:
|
||||
|
||||
.. code-block:: jinja
|
||||
|
||||
{{ max({2: "two", 1: "one", 3: "three", 5: "five", 4: "for"}) }}
|
||||
{# return "two" #}
|
||||
{{ max({2: "e", 1: "a", 3: "b", 5: "d", 4: "c"}) }}
|
||||
{# returns "e" #}
|
||||
|
||||
|
||||
@@ -15,5 +15,6 @@ When called with a mapping, min ignores keys and only compares values:
|
||||
|
||||
.. code-block:: jinja
|
||||
|
||||
{{ min({2: "two", 1: "one", 3: "three", 5: "five", 4: "for"}) }}
|
||||
{# return "five" #}
|
||||
{{ min({2: "e", 3: "a", 1: "b", 5: "d", 4: "c"}) }}
|
||||
{# returns "a" #}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user