X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FTools%2FUtils.php;h=46bb1dc5c82441cd8277f00dc121eec84298697e;hb=963b87362624a39f5443b31a6b3591d70c63493b;hp=4561f39f08cc87741fff5394c89197e78abe14f8;hpb=4094ea47712efbe58624ff74daeb1f77c9b0edcf;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Tools/Utils.php b/src/Wallabag/CoreBundle/Tools/Utils.php index 4561f39f..46bb1dc5 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); } }