Yaffs site version 1.1
[yaffs-website] / vendor / twig / twig / doc / filters / nl2br.rst
diff --git a/vendor/twig/twig/doc/filters/nl2br.rst b/vendor/twig/twig/doc/filters/nl2br.rst
new file mode 100644 (file)
index 0000000..5c923e1
--- /dev/null
@@ -0,0 +1,22 @@
+``nl2br``
+=========
+
+.. versionadded:: 1.5
+    The ``nl2br`` filter was added in Twig 1.5.
+
+The ``nl2br`` filter inserts HTML line breaks before all newlines in a string:
+
+.. code-block:: jinja
+
+    {{ "I like Twig.\nYou will like it too."|nl2br }}
+    {# outputs
+
+        I like Twig.<br />
+        You will like it too.
+
+    #}
+
+.. note::
+
+    The ``nl2br`` filter pre-escapes the input before applying the
+    transformation.