diff --git a/doc/coding_standards.rst b/doc/coding_standards.rst index 5cbd46cf4..310cc8c43 100644 --- a/doc/coding_standards.rst +++ b/doc/coding_standards.rst @@ -10,7 +10,7 @@ Coding Standards When writing Twig templates, we recommend you to follow these official coding standards: -* Put one (and only one) space after the start of a delimiter (``{{``, ``{%``, +* Put exactly one space after the start of a delimiter (``{{``, ``{%``, and ``{#``) and before the end of a delimiter (``}}``, ``%}``, and ``#}``): .. code-block:: twig @@ -28,7 +28,7 @@ standards: {#- comment -#} {%- if foo -%}{%- endif -%} -* Put one (and only one) space before and after the following operators: +* Put exactly one space before and after the following operators: comparison operators (``==``, ``!=``, ``<``, ``>``, ``>=``, ``<=``), math operators (``+``, ``-``, ``/``, ``*``, ``%``, ``//``, ``**``), logic operators (``not``, ``and``, ``or``), ``~``, ``is``, ``in``, and the ternary @@ -40,7 +40,7 @@ standards: {{ foo ~ bar }} {{ true ? true : false }} -* Put one (and only one) space after the ``:`` sign in hashes and ``,`` in +* Put exactly one space after the ``:`` sign in hashes and ``,`` in arrays and hashes: .. code-block:: twig