mergeSiblingGroupsWithCommonAttributes: Avoid creating "empty" <g>-tags

Closes: #260
Signed-off-by: Niels Thykier <niels@thykier.net>
This commit is contained in:
Niels Thykier 2020-08-12 19:49:27 +00:00
parent c84731e12d
commit 005df2023c
No known key found for this signature in database
GPG key ID: A65B78DBE67C7AAC

View file

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