sort style declarations
This commit is contained in:
parent
3929426a5a
commit
ec2a533a35
1 changed files with 3 additions and 0 deletions
|
|
@ -3000,6 +3000,9 @@ def serializeXML(element, options, ind = 0, preserveWhitespace = False):
|
||||||
quot = "'"
|
quot = "'"
|
||||||
|
|
||||||
attrValue = makeWellFormed( attr.nodeValue )
|
attrValue = makeWellFormed( attr.nodeValue )
|
||||||
|
if attr.nodeName == 'style':
|
||||||
|
# sort declarations
|
||||||
|
attrValue = '; '.join([p for p in sorted(attrValue.split(';'))])
|
||||||
|
|
||||||
outParts.append(' ')
|
outParts.append(' ')
|
||||||
# preserve xmlns: if it is a namespace prefix declaration
|
# preserve xmlns: if it is a namespace prefix declaration
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue