diff --git a/src/calibre/gui2/tweak_book/editor/smarts/html.py b/src/calibre/gui2/tweak_book/editor/smarts/html.py index dde2c0cd31..91f031cd29 100644 --- a/src/calibre/gui2/tweak_book/editor/smarts/html.py +++ b/src/calibre/gui2/tweak_book/editor/smarts/html.py @@ -692,6 +692,7 @@ class Smarts(NullSmarts): return True return False + editor.highlighter.join() c = editor.textCursor() block, offset = c.block(), c.positionInBlock() if check_if_in_tag(block, offset) or check_if_in_tag(block.next()):