mirror of
https://gitea.invidious.io/iv-org/shard-radix.git
synced 2024-08-15 00:43:21 +00:00
Correctly split and place child nodes
This commit is contained in:
parent
2f18e7cbd7
commit
ad7976a0c7
1 changed files with 5 additions and 1 deletions
|
@ -147,7 +147,11 @@ module Radix
|
|||
node.children.each do |child|
|
||||
# compare first character
|
||||
next unless child.key[0]? == new_key[0]?
|
||||
next if new_key[0] == ':'
|
||||
if child.key[0] == ':' && new_key[0] == ':'
|
||||
new_key_param = extract_key(Char::Reader.new(new_key))
|
||||
next if child.key != new_key_param
|
||||
new_key = new_key[new_key.index('/') as Int32..-1]
|
||||
end
|
||||
|
||||
# when found, add to this child
|
||||
added = true
|
||||
|
|
Loading…
Reference in a new issue