diff --git a/examples/view-tests/src/main.rs b/examples/view-tests/src/main.rs
index 29eb11b0d..4febf892e 100644
--- a/examples/view-tests/src/main.rs
+++ b/examples/view-tests/src/main.rs
@@ -26,7 +26,7 @@ fn Tests(cx: Scope) -> Element {
view! {
cx,
diff --git a/leptos_macro/src/view.rs b/leptos_macro/src/view.rs
index d75eb4ccd..ad67efdff 100644
--- a/leptos_macro/src/view.rs
+++ b/leptos_macro/src/view.rs
@@ -879,9 +879,12 @@ fn block_to_tokens(
//next_sib = Some(el.clone());
template.push_str("");
+ let end = Ident::new(&format!("{co}_end"), span);
+
navigations.push(quote! {
#location;
let (#el, #co) = #cx.get_next_marker(name);
+ let #end = #co.last().cloned().unwrap_or_else(|| #el.next_sibling().unwrap_throw());
//log::debug!("get_next_marker => {}", #el.node_name());
});
@@ -895,6 +898,8 @@ fn block_to_tokens(
);
});
+ return PrevSibChange::Sib(end);
+
//current = Some(el);
}
// in SSR, it needs to insert the value, wrapped in comments