mirror of
https://github.com/smarty-php/smarty.git
synced 2026-04-29 18:23:24 +02:00
- reformating for PSR-2 coding standards https://github.com/smarty-php/smarty/pull/483
This commit is contained in:
@@ -39,8 +39,12 @@ function smarty_block_textformat($params, $content, Smarty_Internal_Template $te
|
||||
}
|
||||
if (Smarty::$_MBSTRING) {
|
||||
$template->_checkPlugins(
|
||||
array(array('function' => 'smarty_modifier_mb_wordwrap',
|
||||
'file' => SMARTY_PLUGINS_DIR . 'modifier.mb_wordwrap.php'))
|
||||
array(
|
||||
array(
|
||||
'function' => 'smarty_modifier_mb_wordwrap',
|
||||
'file' => SMARTY_PLUGINS_DIR . 'modifier.mb_wordwrap.php'
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
$style = null;
|
||||
@@ -83,10 +87,14 @@ function smarty_block_textformat($params, $content, Smarty_Internal_Template $te
|
||||
// convert mult. spaces & special chars to single space
|
||||
$_paragraph =
|
||||
preg_replace(
|
||||
array('!\s+!' . Smarty::$_UTF8_MODIFIER,
|
||||
'!(^\s+)|(\s+$)!' . Smarty::$_UTF8_MODIFIER),
|
||||
array(' ',
|
||||
''),
|
||||
array(
|
||||
'!\s+!' . Smarty::$_UTF8_MODIFIER,
|
||||
'!(^\s+)|(\s+$)!' . Smarty::$_UTF8_MODIFIER
|
||||
),
|
||||
array(
|
||||
' ',
|
||||
''
|
||||
),
|
||||
$_paragraph
|
||||
);
|
||||
// indent first line
|
||||
|
||||
Reference in New Issue
Block a user