mirror of
https://github.com/fenom-template/fenom.git
synced 2023-08-10 21:13:07 +03:00
Add STRIP option
This commit is contained in:
@@ -140,7 +140,7 @@ class Modifier
|
||||
{
|
||||
$str = trim($str);
|
||||
if ($to_line) {
|
||||
return preg_replace('#[\s]+#ms', ' ', $str);
|
||||
return preg_replace('#\s+#ms', ' ', $str);
|
||||
} else {
|
||||
return preg_replace('#[ \t]{2,}#', ' ', $str);
|
||||
}
|
||||
@@ -158,7 +158,7 @@ class Modifier
|
||||
} elseif (is_array($item)) {
|
||||
return count($item);
|
||||
} elseif ($item instanceof \Countable) {
|
||||
return count($item);
|
||||
return $item->count();
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user