Statistics: count also attributes removed from root SVG element
This commit is contained in:
parent
67bacc2f23
commit
89f4b687f2
1 changed files with 2 additions and 0 deletions
|
|
@ -2934,6 +2934,7 @@ def scourString(in_string, options=None):
|
||||||
|
|
||||||
for attrName in xmlnsDeclsToRemove:
|
for attrName in xmlnsDeclsToRemove:
|
||||||
doc.documentElement.removeAttribute(attrName)
|
doc.documentElement.removeAttribute(attrName)
|
||||||
|
numAttrsRemoved += 1
|
||||||
|
|
||||||
for prefix in redundantPrefixes:
|
for prefix in redundantPrefixes:
|
||||||
remapNamespacePrefix(doc.documentElement, prefix, '')
|
remapNamespacePrefix(doc.documentElement, prefix, '')
|
||||||
|
|
@ -2943,6 +2944,7 @@ def scourString(in_string, options=None):
|
||||||
|
|
||||||
if options.strip_xml_space_attribute and doc.documentElement.hasAttribute('xml:space'):
|
if options.strip_xml_space_attribute and doc.documentElement.hasAttribute('xml:space'):
|
||||||
doc.documentElement.removeAttribute('xml:space')
|
doc.documentElement.removeAttribute('xml:space')
|
||||||
|
numAttrsRemoved += 1
|
||||||
|
|
||||||
# repair style (remove unnecessary style properties and change them into XML attributes)
|
# repair style (remove unnecessary style properties and change them into XML attributes)
|
||||||
numStylePropsFixed = repairStyle(doc.documentElement, options)
|
numStylePropsFixed = repairStyle(doc.documentElement, options)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue