diff --git a/tachys/src/view/iterators.rs b/tachys/src/view/iterators.rs index 49a8e0fbd8..b87f97fc2c 100644 --- a/tachys/src/view/iterators.rs +++ b/tachys/src/view/iterators.rs @@ -327,7 +327,10 @@ where extra_attrs.clone(), ); } - buf.push_str(""); + if escape { + buf.push_str(""); + *position = Position::NextChild; + } } fn to_html_async_with_buf( @@ -359,7 +362,10 @@ where extra_attrs.clone(), ); } - buf.push_sync(""); + if escape { + buf.push_sync(""); + *position = Position::NextChild; + } } fn hydrate( @@ -373,6 +379,7 @@ where .collect(); let marker = cursor.next_placeholder(position); + position.set(Position::NextChild); VecState { states, marker } } diff --git a/tachys/src/view/keyed.rs b/tachys/src/view/keyed.rs index 82e380fc71..184911d135 100644 --- a/tachys/src/view/keyed.rs +++ b/tachys/src/view/keyed.rs @@ -286,6 +286,7 @@ where rendered_items.push(Some((set_index, item))); } let marker = cursor.next_placeholder(position); + position.set(Position::NextChild); KeyedState { parent: Some(parent), marker,