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.md42
1 files changed, 22 insertions, 20 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
index 541233c8b..2808716fc 100644
--- a/vendor/smarty/smarty/docs/designers/language-modifiers/language-modifier-nl2br.md
+++ b/vendor/smarty/smarty/docs/designers/language-modifiers/language-modifier-nl2br.md
@@ -1,35 +1,37 @@
-nl2br {#language.modifier.nl2br}
-=====
+# 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.
+[`nl2br()`](https://www.php.net/nl2br) function.
+## Basic usage
+```smarty
+{$myVar|nl2br}
+```
- <?php
+## Examples
- $smarty->assign('articleTitle',
- "Sun or rain expected\ntoday, dark tonight"
- );
+```php
+<?php
- ?>
+$smarty->assign('articleTitle',
+ "Sun or rain expected\ntoday, dark tonight"
+ );
-
+```
Where the template is:
-
- {$articleTitle|nl2br}
-
+```smarty
+{$articleTitle|nl2br}
+```
-
Will output:
+```
+Sun or rain expected<br />today, dark tonight
+```
- 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).
+See also [`word_wrap`](language-modifier-wordwrap.md),
+[`count_paragraphs`](language-modifier-count-paragraphs.md) and
+[`count_sentences`](language-modifier-count-sentences.md).