aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/smarty/smarty/docs/designers/language-modifiers/language-modifier-nl2br.md
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/smarty/smarty/docs/designers/language-modifiers/language-modifier-nl2br.md')
-rw-r--r--vendor/smarty/smarty/docs/designers/language-modifiers/language-modifier-nl2br.md35
1 files changed, 35 insertions, 0 deletions
diff --git a/vendor/smarty/smarty/docs/designers/language-modifiers/language-modifier-nl2br.md b/vendor/smarty/smarty/docs/designers/language-modifiers/language-modifier-nl2br.md
new file mode 100644
index 000000000..541233c8b
--- /dev/null
+++ b/vendor/smarty/smarty/docs/designers/language-modifiers/language-modifier-nl2br.md
@@ -0,0 +1,35 @@
+nl2br {#language.modifier.nl2br}
+=====
+
+All `"\n"` line breaks will be converted to html `<br />` tags in the
+given variable. This is equivalent to the PHP\'s
+[`nl2br()`](&url.php-manual;nl2br) function.
+
+
+ <?php
+
+ $smarty->assign('articleTitle',
+ "Sun or rain expected\ntoday, dark tonight"
+ );
+
+ ?>
+
+
+
+Where the template is:
+
+
+ {$articleTitle|nl2br}
+
+
+
+Will output:
+
+
+ Sun or rain expected<br />today, dark tonight
+
+
+
+See also [`word_wrap`](#language.modifier.wordwrap),
+[`count_paragraphs`](#language.modifier.count.paragraphs) and
+[`count_sentences`](#language.modifier.count.sentences).