From 1c6f44e095341ef682e95d46c116a482dbf773f9 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 8 Jul 2024 14:32:51 +0200 Subject: [PATCH] Fix markup --- doc/api.rst | 2 +- doc/filters/format_number.rst | 4 ++-- doc/filters/trim.rst | 5 +++-- doc/tags/for.rst | 8 ++++---- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/doc/api.rst b/doc/api.rst index 84b9d5585..7b7801893 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -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 diff --git a/doc/filters/format_number.rst b/doc/filters/format_number.rst index a1c2804ab..994404e07 100644 --- a/doc/filters/format_number.rst +++ b/doc/filters/format_number.rst @@ -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 diff --git a/doc/filters/trim.rst b/doc/filters/trim.rst index a3d36ca03..238928bc7 100644 --- a/doc/filters/trim.rst +++ b/doc/filters/trim.rst @@ -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 diff --git a/doc/tags/for.rst b/doc/tags/for.rst index 3bd859bd0..656d9c07b 100644 --- a/doc/tags/for.rst +++ b/doc/tags/for.rst @@ -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``: