diff options
author | lizyn <zhiylin@outlook.com> | 2019-01-05 12:30:15 +0800 |
---|---|---|
committer | lizyn <zhiylin7@gmail.com> | 2019-01-06 01:21:13 +0800 |
commit | 7f8630b91c1ef0a650bfe7cf422126187eb3c8f2 (patch) | |
tree | 29a1785d7d55c292b73fa6ddfe752ff4e918b1ce /src/Wallabag/CoreBundle | |
parent | 35983eb9bbbf78041ff9f6679ca345850f41c5f1 (diff) | |
download | wallabag-7f8630b91c1ef0a650bfe7cf422126187eb3c8f2.tar.gz wallabag-7f8630b91c1ef0a650bfe7cf422126187eb3c8f2.tar.zst wallabag-7f8630b91c1ef0a650bfe7cf422126187eb3c8f2.zip |
Counting two characters together as a word in CJK
Diffstat (limited to 'src/Wallabag/CoreBundle')
-rw-r--r-- | src/Wallabag/CoreBundle/Tools/Utils.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Wallabag/CoreBundle/Tools/Utils.php b/src/Wallabag/CoreBundle/Tools/Utils.php index c14d2aa0..e56e251e 100644 --- a/src/Wallabag/CoreBundle/Tools/Utils.php +++ b/src/Wallabag/CoreBundle/Tools/Utils.php | |||
@@ -28,6 +28,6 @@ class Utils | |||
28 | */ | 28 | */ |
29 | public static function getReadingTime($text) | 29 | public static function getReadingTime($text) |
30 | { | 30 | { |
31 | return floor(\count(preg_split('~([^\p{L}\p{N}\']+|\p{Han}|\p{Hiragana}|\p{Katakana}|\p{Hangul})~u', strip_tags($text))) / 200); | 31 | return floor(\count(preg_split('~([^\p{L}\p{N}\']+|(\p{Han}|\p{Hiragana}|\p{Katakana}|\p{Hangul}){1,2})~u', strip_tags($text))) / 200); |
32 | } | 32 | } |
33 | } | 33 | } |