From 77e2524174801230b72225fdec4e0d002ae8de46 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 2 Jul 2019 14:13:02 +0530 Subject: [PATCH] Use for strikethrough --- src/calibre/gui2/comments_editor.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/comments_editor.py b/src/calibre/gui2/comments_editor.py index e9f19ab0e7..77b2cb2508 100644 --- a/src/calibre/gui2/comments_editor.py +++ b/src/calibre/gui2/comments_editor.py @@ -111,6 +111,9 @@ def use_implicit_styling_for_span(span, style): if span.tag == 'span' and style.get('text-decoration') == 'underline': span.tag = 'u' del style['text-decoration'] + if span.tag == 'span' and style.get('text-decoration') == 'line-through': + span.tag = 's' + del style['text-decoration'] if span.tag == 'span' and style.get('vertical-align') in ('sub', 'super'): span.tag = 'sub' if style.pop('vertical-align') == 'sub' else 'sup' @@ -1040,6 +1043,7 @@ if __name__ == '__main__': w.resize(800, 600) w.show() w.html = '''

Test Heading

Test blockquote

He hadn't - set out to have an affair, much less a long-term, devoted one.''' + set out to have an affair, + much less a long-term, devoted one.''' app.exec_() # print w.html