X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FTools%2FUtils.php;h=eba21c025d71cb86c79874f4c2ca26b978ffac66;hb=5b6888b13fd44705a232261862a5cc96cebd0a7d;hp=4561f39f08cc87741fff5394c89197e78abe14f8;hpb=625bb561813222aea8a7a2e84e30e9f9de697017;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Tools/Utils.php b/src/Wallabag/CoreBundle/Tools/Utils.php index 4561f39f..eba21c02 100644 --- a/src/Wallabag/CoreBundle/Tools/Utils.php +++ b/src/Wallabag/CoreBundle/Tools/Utils.php @@ -29,6 +29,6 @@ class Utils */ public static function getReadingTime($text) { - return floor(str_word_count(strip_tags($text)) / 200); + return floor(count(preg_split('~[^\p{L}\p{N}\']+~u', strip_tags($text))) / 200); } }