forked from wallabag/wallabag
Fix incorrect reading time calculation for entries in languages with
non-latin chars subset.
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user