E-book viewer: Read aloud: Fix soft hyphens causing read aloud words to be broken up. Fixes #1925988 [Read aloud with soft hyphens read wrong](https://bugs.launchpad.net/calibre/+bug/1925988)

This commit is contained in:
Kovid Goyal 2021-04-25 18:49:15 +05:30
parent 5ce4532f2a
commit 2ba9e9e8d1
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -45,7 +45,8 @@ def index_for_node(node, node_list):
def tts_word_regex():
return /[\p{Letter}\p{Mark}\p{Number}\p{Punctuation}]{1,50}/gu
# Cf is Other, formatting, including soft hyphens zero-width joiners, etc
return /[\p{Letter}\p{Mark}\p{Number}\p{Punctuation}\p{Cf}]{1,50}/gu
def tts_data(text_node, offset):