fixed indentation in the docs
authorfabien <fabien@93ef8e89-cb99-4229-a87c-7fa0fa45744b>
Tue, 15 Dec 2009 07:35:23 +0000 (07:35 +0000)
committerfabien <fabien@93ef8e89-cb99-4229-a87c-7fa0fa45744b>
Tue, 15 Dec 2009 07:35:23 +0000 (07:35 +0000)
git-svn-id: http://svn.twig-project.org/trunk@189 93ef8e89-cb99-4229-a87c-7fa0fa45744b

doc/03-Twig-for-Developers.markdown

index cca6350..6f6ae88 100644 (file)
@@ -315,30 +315,30 @@ Twig 0.9.5 and above):
  * Literals (integers, booleans, arrays, ...) used in the template directly as
    variables or filter arguments are never automatically escaped:
 
-       [twig]
-       {{ "Twig<br />" }} {# won't be escaped #}
+        [twig]
+        {{ "Twig<br />" }} {# won't be escaped #}
 
-       {% set text as "Twig<br />" %}
-       {{ text }} {# will be escaped #}
+        {% set text as "Twig<br />" %}
+        {{ text }} {# will be escaped #}
 
  * Escaping is applied before any other filter is applied (the reasoning
    behind this is that filter transformations should be safe, as the filtered
    value and all its arguments are escaped):
 
-       [twig]
-       {{ var|nl2br }} {# is equivalent to {{ var|escape|nl2br }} #}
+        [twig]
+        {{ var|nl2br }} {# is equivalent to {{ var|escape|nl2br }} #}
 
  * The `safe` filter can be used anywhere in the filter chain:
 
-       [twig]
-       {{ var|upper|nl2br|safe }} {# is equivalent to {{ var|safe|upper|nl2br }} #}
+        [twig]
+        {{ var|upper|nl2br|safe }} {# is equivalent to {{ var|safe|upper|nl2br }} #}
 
  * Automatic escaping is applied to filter arguments, except for literals:
 
-       [twig]
-       {{ var|foo("bar") }} {# "bar" won't be escaped #}
-       {{ var|foo(bar) }} {# bar will be escaped #}
-       {{ var|foo(bar|safe) }} {# bar won't be escaped #}
+        [twig]
+        {{ var|foo("bar") }} {# "bar" won't be escaped #}
+        {{ var|foo(bar) }} {# bar will be escaped #}
+        {{ var|foo(bar|safe) }} {# bar won't be escaped #}
 
  * Automatic escaping is not applied if one of the filter in the chain has the
    `is_escaper` option set to `true` (this is the case for the built-in