diff --git a/leptos_macro/src/view/client_builder.rs b/leptos_macro/src/view/client_builder.rs index 15e0151c4a..4487243c7f 100644 --- a/leptos_macro/src/view/client_builder.rs +++ b/leptos_macro/src/view/client_builder.rs @@ -120,7 +120,22 @@ pub(crate) fn node_to_tokens( global_class, view_marker, ), - Node::Comment(_) | Node::Doctype(_) => Some(quote! {}), + Node::Comment(_) => { + proc_macro_error::emit_error!( + node, + "comment tags do not show up in rendered output\nsupport for \ + this is coming in leptos 0.7" + ); + Some(quote! {}) + } + Node::Doctype(_) => { + proc_macro_error::emit_error!( + node, + "doctype tags do not show up in rendered output\nsupport for \ + this is coming in leptos 0.7" + ); + Some(quote! {}) + } Node::Text(node) => Some(quote! { ::leptos::leptos_dom::html::text(#node) }), @@ -333,7 +348,22 @@ pub(crate) fn element_to_tokens( .unwrap_or_default(), false, ), - Node::Comment(_) | Node::Doctype(_) => (quote! {}, false), + Node::Comment(_) => { + proc_macro_error::emit_error!( + node, + "comment tags do not show up in rendered \ + output\nsupport for this is coming in leptos 0.7" + ); + (quote! {}, false) + } + Node::Doctype(_) => { + proc_macro_error::emit_error!( + node, + "doctype tags do not show up in rendered \ + output\nsupport for this is coming in leptos 0.7" + ); + (quote! {}, false) + } }; if is_static { quote! { diff --git a/leptos_macro/src/view/server_template.rs b/leptos_macro/src/view/server_template.rs index 57e51ca635..c0d4ee552b 100644 --- a/leptos_macro/src/view/server_template.rs +++ b/leptos_macro/src/view/server_template.rs @@ -39,7 +39,22 @@ pub(crate) fn root_node_to_tokens_ssr( global_class, view_marker, ), - Node::Comment(_) | Node::Doctype(_) => quote! {}, + Node::Comment(_) => { + proc_macro_error::emit_error!( + node, + "comment tags do not show up in rendered output\nsupport for \ + this is coming in leptos 0.7" + ); + quote! {} + } + Node::Doctype(_) => { + proc_macro_error::emit_error!( + node, + "doctype tags do not show up in rendered output\nsupport for \ + this is coming in leptos 0.7" + ); + quote! {} + } Node::Text(node) => { quote! { ::leptos::leptos_dom::html::text(#node) @@ -386,7 +401,22 @@ fn element_to_tokens_ssr( Span::call_site(), "You can't nest a fragment inside an element." ), - Node::Comment(_) | Node::Doctype(_) => {} + Node::Comment(_) => { + proc_macro_error::emit_error!( + child, + "comment tags do not show up in rendered \ + output\nsupport for this is coming in leptos \ + 0.7" + ); + } + Node::Doctype(_) => { + proc_macro_error::emit_error!( + child, + "doctype tags do not show up in rendered \ + output\nsupport for this is coming in leptos \ + 0.7" + ); + } } } }