Skip to content

Commit

Permalink
namespace: ignore nested records
Browse files Browse the repository at this point in the history
In Gsk-4.0 the record Gsk.PathPoint contains a nested record.
In case the tag didn't have a name we would just go up the tree
until we found one. In case of a nested record this results in
Gsk.PathPoint being found twice, the second time with the nested
record which should be record.

Fix by not going up for "record" which should never be needed there.
  • Loading branch information
lazka committed Jan 25, 2025
1 parent 0bb32d6 commit 239488b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pgidocgen/namespace.py
Original file line number Diff line number Diff line change
Expand Up @@ -697,12 +697,18 @@ def get_name(elm):

return n

# these can be nested, so if there is not name, don't go up the tree
# or we might up ending up with the same name as the parent record
requires_name = ["record"]

l = []
tags = []
current = e
name = get_name(current)
if name is not None:
l.append(name)
elif current.tagName in requires_name:
continue
shadowed = False
while current.tagName != "namespace":
# this gets shadowed by another entry, bail out
Expand Down

0 comments on commit 239488b

Please sign in to comment.