aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/twig/twig/doc/filters/nl2br.rst
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/twig/twig/doc/filters/nl2br.rst')
-rw-r--r--vendor/twig/twig/doc/filters/nl2br.rst22
1 files changed, 22 insertions, 0 deletions
diff --git a/vendor/twig/twig/doc/filters/nl2br.rst b/vendor/twig/twig/doc/filters/nl2br.rst
new file mode 100644
index 00000000..694c6724
--- /dev/null
+++ b/vendor/twig/twig/doc/filters/nl2br.rst
@@ -0,0 +1,22 @@
1``nl2br``
2=========
3
4.. versionadded:: 1.5
5 The nl2br filter was added in Twig 1.5.
6
7The ``nl2br`` filter inserts HTML line breaks before all newlines in a string:
8
9.. code-block:: jinja
10
11 {{ "I like Twig.\nYou will like it too."|nl2br }}
12 {# outputs
13
14 I like Twig.<br />
15 You will like it too.
16
17 #}
18
19.. note::
20
21 The ``nl2br`` filter pre-escapes the input before applying the
22 transformation.