From 7de0514d30f105b5336793ae7270f324ec61991d Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 12 Dec 2022 19:58:45 +0530 Subject: [PATCH] ... --- src/calibre/gui2/tweak_book/editor/text.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/calibre/gui2/tweak_book/editor/text.py b/src/calibre/gui2/tweak_book/editor/text.py index a8c0541bfa..dcf4aa389a 100644 --- a/src/calibre/gui2/tweak_book/editor/text.py +++ b/src/calibre/gui2/tweak_book/editor/text.py @@ -871,8 +871,7 @@ class TextEdit(PlainTextEdit): 'color': ('' % color, ''), 'background-color': ('' % color, ''), }[formatting] - if hasattr(self.smarts, 'surround_with_custom_tag'): - self.smarts.surround_with_custom_tag(self, prefix, suffix) + self.smarts.surround_with_custom_tag(self, prefix, suffix) def insert_image(self, href, fullpage=False, preserve_aspect_ratio=False, width=-1, height=-1): if width <= 0: