From 2ba9e9e8d192c44042c762025646e0c00a64eba4 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 25 Apr 2021 18:49:15 +0530 Subject: [PATCH] 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) --- src/pyj/read_book/find.pyj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pyj/read_book/find.pyj b/src/pyj/read_book/find.pyj index d08f011be7..1fc4e2877e 100644 --- a/src/pyj/read_book/find.pyj +++ b/src/pyj/read_book/find.pyj @@ -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):