Deal with the nodes between two nodes.