An issue has been confirmed where the find_node_after and find_node_before works unexpected after nodes are removed, which is reported in https://github.com/hizzgdev/jsmind/issues/551.
The api find_node_after and find_node_before relies on the continuity of index field of nodes. But the index of nodes are not updated after nodes are removed.
This PR update the nodes' index, and resolve #551.
An issue has been confirmed where the
find_node_after
andfind_node_before
works unexpected after nodes are removed, which is reported in https://github.com/hizzgdev/jsmind/issues/551.The api
find_node_after
andfind_node_before
relies on the continuity ofindex
field of nodes. But the index of nodes are not updated after nodes are removed.This PR update the nodes' index, and resolve #551.