From e67d976fce25152ef596d1920f2cf5b200205bd5 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 8 Jan 2012 21:24:46 +0100 Subject: [PATCH] added one more rule to the coding standards --- doc/coding_standards.rst | 14 +++++++++++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git a/doc/coding_standards.rst b/doc/coding_standards.rst index df88e04..dc9e3d6 100644 --- a/doc/coding_standards.rst +++ b/doc/coding_standards.rst @@ -23,9 +23,10 @@ standards: {%- if foo -%}{%- endif -%} * Put one (and only one) space before and after the following operators: - comparison operators (``==``, ``!=``, ``<``, ``>``, ``>=``, and ``<=``), - math operators (``+``, ``-``, ``/``, ``*``, ``%``, ``//``, ``**``), ``~``, - ``is``, ``in``, ``not``, ``and``, ``or``, and the ternary operator (``?:``): + comparison operators (``==``, ``!=``, ``<``, ``>``, ``>=``, ``<=``), math + operators (``+``, ``-``, ``/``, ``*``, ``%``, ``//``, ``**``), logic + operators (``not``, ``and``, ``or``), ``~``, ``is``, ``in``, and the ternary + operator (``?:``): .. code-block:: jinja @@ -41,6 +42,13 @@ standards: {{ [1, 2, 3] }} {{ {'foo': 'bar'} }} +* Do not put any spaces after an opening parenthesis and before a closing + parenthesis in expressions: + + .. code-block:: jinja + + {{ 1 + (2 * 3) }} + * Do not put any spaces before and after string delimiters: .. code-block:: jinja -- 1.7.2.5