diff --git a/src/calibre/gui2/tweak_book/editor/text.py b/src/calibre/gui2/tweak_book/editor/text.py index bd983ee9d3..e8584572e3 100644 --- a/src/calibre/gui2/tweak_book/editor/text.py +++ b/src/calibre/gui2/tweak_book/editor/text.py @@ -625,7 +625,7 @@ class TextEdit(PlainTextEdit): def link_for_position(self, pos): c = self.cursorForPosition(pos) r = self.syntax_range_for_cursor(c) - if r is not None and r.format.property(LINK_PROPERTY).toBool(): + if r is not None and r.format.property(LINK_PROPERTY): return self.text_for_range(c.block(), r) def mousePressEvent(self, ev):