From 1bc53895760824457e12f15dbd7ed2a354d73d17 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 19 Dec 2019 23:10:52 +0530 Subject: [PATCH] Edit Book: Spell Check: Fix words surrounded by narrow non-breaking spaces being incorrectly detected as mis-spelled --- src/calibre/ebooks/oeb/polish/spell.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/ebooks/oeb/polish/spell.py b/src/calibre/ebooks/oeb/polish/spell.py index b07ea6f8f6..8ffe264bcb 100644 --- a/src/calibre/ebooks/oeb/polish/spell.py +++ b/src/calibre/ebooks/oeb/polish/spell.py @@ -94,7 +94,7 @@ def add_words(text, node, words, file_name, locale, node_item): p = patterns() is_fr = locale.langcode == 'fra' for word in candidates: - sword = p.sanitize_invisible_pat.sub('', word) + sword = p.sanitize_invisible_pat.sub('', word).strip() elided_prefix = '' if is_fr: m = p.fr_elision_pat.match(sword)