1
0
mirror of https://github.com/KanjiVG/kanjivg.git synced 2026-08-04 19:33:08 +02:00

Remove check for empty element in components recursive

This removes a check which stops recursion in components in
kanjivg.py. The check prevents elements from being found if the group
above them doesn't have an element, which seems to be an error.
This commit is contained in:
Ben Bullock
2026-05-13 06:17:07 +09:00
parent 2fe6daaba5
commit 833e5cb6af
2 changed files with 10 additions and 1 deletions
+1 -1
View File
@@ -181,7 +181,7 @@ class StrokeGr:
newLevel = level
if found: newLevel += 1
childsComp += child.components(simplified, recursive, newLevel)
if recursive and not len(ret) == 0: ret = [ level ] + ret + childsComp
if recursive: ret = [ level ] + ret + childsComp
return ret
def simplify(self):
+9
View File
@@ -3949,6 +3949,9 @@
"057f4-Kaisho.svg",
"057f4.svg"
],
"埵":[
"057f5.svg"
],
"埶":[
"057f6.svg"
],
@@ -11825,6 +11828,9 @@
"07001-KaishoVtLst.svg",
"07001.svg"
],
"瀆":[
"07006.svg"
],
"瀉":[
"07009-Kaisho.svg",
"07009-KaishoHzLst.svg",
@@ -16307,6 +16313,9 @@
"罠":[
"07f60.svg"
],
"罣":[
"07f63.svg"
],
"罧":[
"07f67-Kaisho.svg",
"07f67.svg"