convertColors: Fix bug in computation in how many bytes are saved
Signed-off-by: Niels Thykier <niels@thykier.net>
This commit is contained in:
parent
a15acb3e4e
commit
807b2ada85
1 changed files with 1 additions and 1 deletions
|
|
@ -2205,7 +2205,7 @@ def convertColors(element):
|
||||||
newBytes = len(newColorValue)
|
newBytes = len(newColorValue)
|
||||||
if oldBytes > newBytes:
|
if oldBytes > newBytes:
|
||||||
styles[attr] = newColorValue
|
styles[attr] = newColorValue
|
||||||
numBytes += (oldBytes - len(element.getAttribute(attr)))
|
numBytes += (oldBytes - newBytes)
|
||||||
_setStyle(element, styles)
|
_setStyle(element, styles)
|
||||||
|
|
||||||
# now recurse for our child elements
|
# now recurse for our child elements
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue