diff options
author | Mario <mario@mariovavti.com> | 2023-07-11 18:57:18 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2023-07-11 18:57:18 +0000 |
commit | 63fb8d03929189bfc8cbf53d23cb79984fe2c3cd (patch) | |
tree | b9f74bd8c7721dca7ece251fdbb9a7c4fe9b949a /vendor/smarty/smarty/docs/designers/language-modifiers/language-modifier-nl2br.md | |
parent | 57796a2f962d045445cbf69237bb3d6786e4d0d4 (diff) | |
parent | 384de0925e502cfa8fe6ca287530ef5529fdff10 (diff) | |
download | volse-hubzilla-8.6.tar.gz volse-hubzilla-8.6.tar.bz2 volse-hubzilla-8.6.zip |
Merge branch '8.6RC'8.6
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.md | 42 |
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). |