convertColors: Fix bug in computation in how many bytes are saved

Signed-off-by: Niels Thykier <niels@thykier.net>
This commit is contained in:
Niels Thykier 2020-05-19 20:21:40 +00:00
parent a15acb3e4e
commit 807b2ada85
No known key found for this signature in database
GPG key ID: A65B78DBE67C7AAC

View file

@ -2205,7 +2205,7 @@ def convertColors(element):
newBytes = len(newColorValue)
if oldBytes > newBytes:
styles[attr] = newColorValue
numBytes += (oldBytes - len(element.getAttribute(attr)))
numBytes += (oldBytes - newBytes)
_setStyle(element, styles)
# now recurse for our child elements