Comments editor: Workaround for Qt inserting invalid font-weight when converting a paragraph to a heading. Fixes #1989177 [Comment heading with invalide weight](https://bugs.launchpad.net/calibre/+bug/1989177)

This commit is contained in:
Kovid Goyal 2022-09-14 10:29:05 +05:30
parent 72ea1fe57b
commit 814784b2f8
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -103,7 +103,7 @@ def remove_heading_font_styles(tag, style):
expected_size = (None, 'xx-large', 'x-large', 'large', None, 'small', 'x-small')[lvl]
if style.get('font-size', 1) == expected_size:
del style['font-size']
if style.get('font-weight') in ('600', '700', 'bold'):
if style.get('font-weight') in ('0', '600', '700', 'bold'):
del style['font-weight']