mirror of
https://github.com/wallabag/wallabag.git
synced 2025-07-22 17:18:37 +00:00
Fix incorrect reading time calculation for entries in languages with
non-latin chars subset.
This commit is contained in:
parent
625bb56181
commit
5b6888b13f
5 changed files with 54 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue