diff options
author | friendica <info@friendica.com> | 2014-12-12 00:28:46 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-12-12 00:28:46 -0800 |
commit | b30ea4c2c51f893bf0cffbea38e875cb01c6c431 (patch) | |
tree | 07c6f125256c73bfa29fe2dfed0f601def167adc /library/Smarty/libs/plugins/modifiercompiler.count_sentences.php | |
parent | d3465802d6433bcd4cf24971951e0633161b0665 (diff) | |
parent | 967ab871b836f618107fe144978bd1453c3c6634 (diff) | |
download | volse-hubzilla-b30ea4c2c51f893bf0cffbea38e875cb01c6c431.tar.gz volse-hubzilla-b30ea4c2c51f893bf0cffbea38e875cb01c6c431.tar.bz2 volse-hubzilla-b30ea4c2c51f893bf0cffbea38e875cb01c6c431.zip |
Merge https://github.com/friendica/red into pending_merge
Diffstat (limited to 'library/Smarty/libs/plugins/modifiercompiler.count_sentences.php')
-rw-r--r-- | library/Smarty/libs/plugins/modifiercompiler.count_sentences.php | 55 |
1 files changed, 27 insertions, 28 deletions
diff --git a/library/Smarty/libs/plugins/modifiercompiler.count_sentences.php b/library/Smarty/libs/plugins/modifiercompiler.count_sentences.php index 2f517be96..f1ec56007 100644 --- a/library/Smarty/libs/plugins/modifiercompiler.count_sentences.php +++ b/library/Smarty/libs/plugins/modifiercompiler.count_sentences.php @@ -1,28 +1,27 @@ -<?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<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) +{ + // 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)'; +} |