convertColors: Fix bug in computation in how many bytes are saved (#245)

Signed-off-by: Niels Thykier <niels@thykier.net>
This commit is contained in:
Niels Thykier 2020-06-07 16:35:46 +00:00 committed by GitHub
parent a15acb3e4e
commit 47e8b15315
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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