mergeSiblingGroupsWithCommonAttributes: Avoid creating "empty" <g>-tags (#261)

Closes: #260
Signed-off-by: Niels Thykier <niels@thykier.net>
This commit is contained in:
Niels Thykier 2020-09-02 17:03:36 +00:00 committed by GitHub
parent c84731e12d
commit f56843acc0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1158,6 +1158,9 @@ def mergeSiblingGroupsWithCommonAttributes(elem):
i -= 1 i -= 1
continue continue
attributes = {a.nodeName: a.nodeValue for a in currentNode.attributes.values()} attributes = {a.nodeName: a.nodeValue for a in currentNode.attributes.values()}
if not attributes:
i -= 1
continue
runStart, runEnd = i, i runStart, runEnd = i, i
runElements = 1 runElements = 1
while runStart > 0: while runStart > 0: