Edit Book: Fix an error when merging CSS stylesheets that contain @charset rules

This commit is contained in:
Kovid Goyal 2014-04-29 11:14:03 +05:30
parent f8d91b7a09
commit 4ef845f592

View File

@ -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)