From a9d053f5c1ee27b03f8a56b3e206fd49c8ec2d95 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 3 Oct 2024 21:22:44 +0530 Subject: [PATCH] ... --- src/calibre/spell/break_iterator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/spell/break_iterator.py b/src/calibre/spell/break_iterator.py index 65b3828ae2..d97060e5b2 100644 --- a/src/calibre/spell/break_iterator.py +++ b/src/calibre/spell/break_iterator.py @@ -162,7 +162,7 @@ def mark_sentences_in_html(root, lang: str = '') -> list[Sentence]: return True return False - root_lang = lang_for_elem(root, canonicalize_lang(lang or get_lang())) + root_lang = lang_for_elem(root, canonicalize_lang(lang or get_lang())) or 'eng' seen_ids = set(root.xpath('//*/@id')) id_counter = 1 ans = []