fix: SVG <use> in SSR (#1203)

This commit is contained in:
Greg Johnston
2023-06-17 16:47:39 -04:00
committed by GitHub
parent 651868dec9
commit acfc86d2a4

View File

@@ -427,14 +427,14 @@ fn element_to_tokens_ssr(
{#component}.into_view(#cx)
}));
} else {
let tag_name = node
.name()
.to_string()
.replace("svg::", "")
.replace("math::", "");
let tag_name = node.name().to_string();
let tag_name = tag_name
.trim_start_matches("svg::")
.trim_start_matches("math::")
.trim_end_matches('_');
let is_script_or_style = tag_name == "script" || tag_name == "style";
template.push('<');
template.push_str(&tag_name);
template.push_str(tag_name);
#[cfg(debug_assertions)]
stmts_for_ide.save_element_completion(node);