mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-23 12:43:08 +00:00
Merge pull request #652 from Demonthos/fix-fmt-escape
fix fmt escape sequences in static attribute/text nodes
This commit is contained in:
commit
1e50bc8c99
1 changed files with 3 additions and 3 deletions
|
@ -182,7 +182,7 @@ impl<'a> DynamicContext<'a> {
|
|||
|
||||
let static_attrs = el.attributes.iter().map(|attr| match &attr.attr {
|
||||
ElementAttr::AttrText { name, value } if value.is_static() => {
|
||||
let value = value.source.as_ref().unwrap();
|
||||
let value = value.to_static().unwrap();
|
||||
quote! {
|
||||
::dioxus::core::TemplateAttribute::Static {
|
||||
name: dioxus_elements::#el_name::#name.0,
|
||||
|
@ -196,7 +196,7 @@ impl<'a> DynamicContext<'a> {
|
|||
}
|
||||
|
||||
ElementAttr::CustomAttrText { name, value } if value.is_static() => {
|
||||
let value = value.source.as_ref().unwrap();
|
||||
let value = value.to_static().unwrap();
|
||||
quote! {
|
||||
::dioxus::core::TemplateAttribute::Static {
|
||||
name: #name,
|
||||
|
@ -244,7 +244,7 @@ impl<'a> DynamicContext<'a> {
|
|||
}
|
||||
|
||||
BodyNode::Text(text) if text.is_static() => {
|
||||
let text = text.source.as_ref().unwrap();
|
||||
let text = text.to_static().unwrap();
|
||||
quote! { ::dioxus::core::TemplateNode::Text{ text: #text } }
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue