From ab5d8d4e07bb3c8230d0285ef8902ef1979fce51 Mon Sep 17 00:00:00 2001 From: emkael Date: Thu, 18 Oct 2018 02:39:34 +0200 Subject: Updating Smarty --- .../plugins/modifiercompiler.count_sentences.php | 54 +++++++++++----------- 1 file changed, 26 insertions(+), 28 deletions(-) (limited to 'lib/smarty/plugins/modifiercompiler.count_sentences.php') diff --git a/lib/smarty/plugins/modifiercompiler.count_sentences.php b/lib/smarty/plugins/modifiercompiler.count_sentences.php index 2f517be..0277456 100644 --- a/lib/smarty/plugins/modifiercompiler.count_sentences.php +++ b/lib/smarty/plugins/modifiercompiler.count_sentences.php @@ -1,28 +1,26 @@ - - * Name: count_sentences - * Purpose: count the number of sentences in a text - * - * @link http://www.smarty.net/manual/en/language.modifier.count.paragraphs.php - * count_sentences (Smarty online manual) - * @author Uwe Tews - * @param array $params parameters - * @return string with compiled code - */ -function smarty_modifiercompiler_count_sentences($params, $compiler) -{ - // find periods, question marks, exclamation marks with a word before but not after. - return 'preg_match_all("#\w[\.\?\!](\W|$)#S' . Smarty::$_UTF8_MODIFIER . '", ' . $params[0] . ', $tmp)'; -} - -?> \ No newline at end of file +