From bf59c9c4dab7ae2a723f41dcee106736f9d55ef6 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 24 Jun 2014 10:16:04 +0530 Subject: [PATCH] Fix #1333459 [Edit Book: Starting mdash breaks spellchecking](https://bugs.launchpad.net/calibre/+bug/1333459) (regression introduced by performance optimizations from yesterday) --- src/calibre/gui2/tweak_book/editor/syntax/html.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/gui2/tweak_book/editor/syntax/html.py b/src/calibre/gui2/tweak_book/editor/syntax/html.py index 85f77e7aa8..145cec22de 100644 --- a/src/calibre/gui2/tweak_book/editor/syntax/html.py +++ b/src/calibre/gui2/tweak_book/editor/syntax/html.py @@ -245,7 +245,7 @@ def check_spelling(text, tpos, tlen, fmt, locale, sfmt): if start > ppos: split_ans.append((start - ppos, fmt)) ppos = start + length - recognized = dictionaries.recognized(text[tpos + start:ppos], locale) + recognized = dictionaries.recognized(text[tpos + start:tpos + ppos], locale) if recognized: split_ans.append((length, fmt)) else: