mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-05 06:56:51 +00:00
Fix markup
This commit is contained in:
+1
-1
@@ -431,7 +431,7 @@ The escaping rules are implemented as follows:
|
||||
|
||||
{{ var|upper }} {# is equivalent to {{ var|upper|escape }} #}
|
||||
|
||||
* The `raw` filter should only be used at the end of the filter chain:
|
||||
* The ``raw`` filter should only be used at the end of the filter chain:
|
||||
|
||||
.. code-block:: twig
|
||||
|
||||
|
||||
@@ -62,8 +62,8 @@ The list of supported styles:
|
||||
* ``ordinal``;
|
||||
* ``duration``.
|
||||
|
||||
As a shortcut, you can use the ``format_*_number`` filters by replacing `*` with
|
||||
a style:
|
||||
As a shortcut, you can use the ``format_*_number`` filters by replacing ``*``
|
||||
with a style:
|
||||
|
||||
.. code-block:: twig
|
||||
|
||||
|
||||
@@ -31,8 +31,9 @@ Arguments
|
||||
|
||||
* ``character_mask``: The characters to strip
|
||||
|
||||
* ``side``: The default is to strip from the left and the right (`both`) sides, but `left`
|
||||
and `right` will strip from either the left side or right side only
|
||||
* ``side``: The default is to strip from the left and the right (``both``)
|
||||
sides, but ``left`` and ``right`` will strip from either the left side or
|
||||
right side only
|
||||
|
||||
.. _`trim`: https://www.php.net/trim
|
||||
.. _`ltrim`: https://www.php.net/ltrim
|
||||
|
||||
+4
-4
@@ -50,8 +50,8 @@ The ``..`` operator can take any expression at both sides:
|
||||
If you need a step different from 1, you can use the ``range`` function
|
||||
instead.
|
||||
|
||||
The `loop` variable
|
||||
-------------------
|
||||
The ``loop`` variable
|
||||
---------------------
|
||||
|
||||
Inside of a ``for`` loop block you can access some special variables:
|
||||
|
||||
@@ -80,8 +80,8 @@ Variable Description
|
||||
``loop.last`` variables are only available for PHP arrays, or objects that
|
||||
implement the ``Countable`` interface.
|
||||
|
||||
The `else` Clause
|
||||
-----------------
|
||||
The ``else`` Clause
|
||||
-------------------
|
||||
|
||||
If no iteration took place because the sequence was empty, you can render a
|
||||
replacement block by using ``else``:
|
||||
|
||||
Reference in New Issue
Block a user