Skip to content

Commit a03a6fd

Browse files
committed
Merge pull request #1794 from fabpot/quick-fix-twig
tweaked Twig introduction
2 parents de915d3 + 2c975b5 commit a03a6fd

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

book/templating.rst

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -127,17 +127,18 @@ Throughout this chapter, template examples will be shown in both Twig and PHP.
127127
not program logic. The more you use Twig, the more you'll appreciate
128128
and benefit from this distinction. And of course, you'll be loved by
129129
web designers everywhere.
130-
131-
Twig can also do things that PHP can't, such as whitespace control, sandboxing,
132-
and the inclusion of custom functions and filters that only affect templates.
133-
Twig contains little features that make writing templates easier and
134-
more concise. Take the following example, which combines a loop with
135-
a logical ``if`` statement:
136-
130+
131+
Twig can also do things that PHP can't, such as whitespace control,
132+
sandboxing, automatic and contextual output escaping, and the inclusion of
133+
custom functions and filters that only affect templates. Twig contains
134+
little features that make writing templates easier and more concise. Take
135+
the following example, which combines a loop with a logical ``if``
136+
statement:
137+
137138
.. code-block:: html+jinja
138-
139+
139140
<ul>
140-
{% for user in users %}
141+
{% for user in users if user.active %}
141142
<li>{{ user.username }}</li>
142143
{% else %}
143144
<li>No users found</li>

0 commit comments

Comments
 (0)