|
|
@ -944,15 +944,16 @@ function get_possible_element_siblings(node, adjacent_only) {
|
|
|
|
let prev = node;
|
|
|
|
let prev = node;
|
|
|
|
while ((prev = find_previous_sibling(prev))) {
|
|
|
|
while ((prev = find_previous_sibling(prev))) {
|
|
|
|
if (prev.type === 'RegularElement') {
|
|
|
|
if (prev.type === 'RegularElement') {
|
|
|
|
if (
|
|
|
|
const has_slot_attribute = prev.attributes.some(
|
|
|
|
!prev.attributes.find(
|
|
|
|
|
|
|
|
(attr) => attr.type === 'Attribute' && attr.name.toLowerCase() === 'slot'
|
|
|
|
(attr) => attr.type === 'Attribute' && attr.name.toLowerCase() === 'slot'
|
|
|
|
)
|
|
|
|
);
|
|
|
|
) {
|
|
|
|
|
|
|
|
|
|
|
|
if (!has_slot_attribute) {
|
|
|
|
result.set(prev, NODE_DEFINITELY_EXISTS);
|
|
|
|
result.set(prev, NODE_DEFINITELY_EXISTS);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (adjacent_only) {
|
|
|
|
if (adjacent_only) {
|
|
|
|
break;
|
|
|
|
return result;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else if (is_block(prev)) {
|
|
|
|
} else if (is_block(prev)) {
|
|
|
|
const possible_last_child = get_possible_last_child(prev, adjacent_only);
|
|
|
|
const possible_last_child = get_possible_last_child(prev, adjacent_only);
|
|
|
@ -971,7 +972,6 @@ function get_possible_element_siblings(node, adjacent_only) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!prev || !adjacent_only) {
|
|
|
|
|
|
|
|
/** @type {Compiler.SvelteNode | null} */
|
|
|
|
/** @type {Compiler.SvelteNode | null} */
|
|
|
|
let parent = node;
|
|
|
|
let parent = node;
|
|
|
|
|
|
|
|
|
|
|
@ -993,7 +993,6 @@ function get_possible_element_siblings(node, adjacent_only) {
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|