Version 1.14a

This commit is contained in:
nemunaire 2020-11-15 16:12:32 +01:00
commit dc48225dc9
1094 changed files with 189052 additions and 13889 deletions

View file

@ -2,7 +2,7 @@
/**
* Smarty plugin
* @package Smarty
* @subpackage plugins
* @subpackage PluginsModifier
*/
@ -20,14 +20,6 @@
*/
function smarty_modifier_count_words($string)
{
// split text by ' ',\r,\n,\f,\t
$split_array = preg_split('/\s+/',$string);
// count matches that contain alphanumerics
$word_count = preg_grep('/[a-zA-Z0-9\\x80-\\xff]/', $split_array);
return count($word_count);
return str_word_count($string);
}
/* vim: set expandtab: */
?>