summaryrefslogtreecommitdiff
path: root/lib/smarty/plugins/modifiercompiler.count_sentences.php
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2018-10-18 02:39:34 +0200
committeremkael <emkael@tlen.pl>2018-10-18 02:39:42 +0200
commitab5d8d4e07bb3c8230d0285ef8902ef1979fce51 (patch)
tree0b955e585cb2fdbc7207392a5f2c97d610b6a5bc /lib/smarty/plugins/modifiercompiler.count_sentences.php
parentc055ce2ab60c6582bad3e5babcb1d00384fde78a (diff)
Updating Smarty
Diffstat (limited to 'lib/smarty/plugins/modifiercompiler.count_sentences.php')
-rw-r--r--lib/smarty/plugins/modifiercompiler.count_sentences.php54
1 files changed, 26 insertions, 28 deletions
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 @@
-<?php
-/**
- * Smarty plugin
- *
- * @package Smarty
- * @subpackage PluginsModifierCompiler
- */
-
-/**
- * Smarty count_sentences modifier plugin
- *
- * Type: modifier<br>
- * 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
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsModifierCompiler
+ */
+/**
+ * Smarty count_sentences modifier plugin
+ * Type: modifier
+ * 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)
+{
+ // 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)';
+}