cosey 0.11.5 → 0.11.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/utils/tree.js +5 -2
package/package.json
CHANGED
package/utils/tree.js
CHANGED
|
@@ -109,8 +109,11 @@ function mapTreeExtra(tree, callback, options, _internalLevel = 1) {
|
|
|
109
109
|
}
|
|
110
110
|
function getNextSibling(node, mergeLast) {
|
|
111
111
|
if (node) {
|
|
112
|
-
|
|
113
|
-
|
|
112
|
+
let nextSibling = node.nextSibling;
|
|
113
|
+
while (mergeLast && nextSibling && nextSibling.reverseLevel === 1 && nextSibling.prevSibling?.reverseLevel === 1) {
|
|
114
|
+
nextSibling = nextSibling.nextSibling;
|
|
115
|
+
}
|
|
116
|
+
if (nextSibling) {
|
|
114
117
|
return nextSibling;
|
|
115
118
|
} else {
|
|
116
119
|
return getNextSibling(node.parent, mergeLast);
|