mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
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:
parent
72ea1fe57b
commit
814784b2f8
@ -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']
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user