Tweak docs

This commit is contained in:
Fabien Potencier
2022-12-28 14:50:47 +01:00
parent 1dc69ff852
commit 7b4d2a69f3
2 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
# 3.5.0 (2022-12-27)
* Make Twig\ExpressionParser non-internal
* Add "some" and "every" tests
* Add "has some" and "has every" operators
* Add Compile::reset()
* Throw a better runtime error when the "matches" regexp is not valid
* Add "twig *_names" intl functions
+5 -4
View File
@@ -505,7 +505,8 @@ Twig allows expressions everywhere.
The operator precedence is as follows, with the lowest-precedence operators
listed first: ``?:`` (ternary operator), ``b-and``, ``b-xor``, ``b-or``,
``or``, ``and``, ``==``, ``!=``, ``<=>``, ``<``, ``>``, ``>=``, ``<=``,
``in``, ``matches``, ``starts with``, ``ends with``, ``has every``, ``has some``, ``..``, ``+``, ``-``,
``in``, ``matches``, ``starts with``, ``ends with``, ``has every``, ``has
some``, ``..``, ``+``, ``-``,
``~``, ``*``, ``/``, ``//``, ``%``, ``is`` (tests), ``**``, ``??``, ``|``
(filters), ``[]``, and ``.``:
@@ -661,9 +662,9 @@ next section).
{% if phone matches '/^[\\d\\.]+$/' %}
{% endif %}
Check that a sequence or a mapping ``has every`` or ``has some`` of its elements
``true`` using an arrow function. The arrow function receives the value of the
sequence or mapping.
Check that a sequence or a mapping ``has every`` or ``has some`` of its
elements return ``true`` using an arrow function. The arrow function receives
the value of the sequence or mapping:
.. code-block:: twig