mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-14 11:27:00 +00:00
Tweak docs
This commit is contained in:
@@ -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
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user