mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Edit Book: Fix an error when merging CSS stylesheets that contain @charset rules
This commit is contained in:
parent
f8d91b7a09
commit
4ef845f592
@ -419,7 +419,7 @@ def merge_css(container, names, master):
|
||||
|
||||
# Remove charset rules
|
||||
cr = [r for r in sheet.cssRules if r.type == r.CHARSET_RULE]
|
||||
[sheet.remove(r) for r in cr]
|
||||
[sheet.deleteRule(sheet.cssRules.index(r)) for r in cr]
|
||||
for rule in sheet.cssRules:
|
||||
msheet.add(rule)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user