chore: start instead of flart
This commit is contained in:
1 parent
8b854963e9
commit
c240aebfa1
3 files changed
+6
-7
No files matched your search
@@ -154,8 +154,8 @@ impl Buffer {
|
|||||||
let mut total = 0;
|
let mut total = 0;
|
||||||
|
|
||||||
for attr in attributes {
|
for attr in attributes {
|
||||||
if self.current_span_is_primary(attr.attr.flart()) {
|
if self.current_span_is_primary(attr.attr.start()) {
|
||||||
'line: for line in self.src[..attr.attr.flart().start().line - 1].iter().rev() {
|
'line: for line in self.src[..attr.attr.start().start().line - 1].iter().rev() {
|
||||||
match (line.trim().starts_with("//"), line.is_empty()) {
|
match (line.trim().starts_with("//"), line.is_empty()) {
|
||||||
(true, _) => return 100000,
|
(true, _) => return 100000,
|
||||||
(_, true) => continue 'line,
|
(_, true) => continue 'line,
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ impl Buffer {
|
|||||||
while let Some(attr) = attr_iter.next() {
|
while let Some(attr) = attr_iter.next() {
|
||||||
self.indent += 1;
|
self.indent += 1;
|
||||||
if !sameline {
|
if !sameline {
|
||||||
self.write_comments(attr.attr.flart())?;
|
self.write_comments(attr.attr.start())?;
|
||||||
}
|
}
|
||||||
self.indent -= 1;
|
self.indent -= 1;
|
||||||
|
|
||||||
|
|||||||
@@ -66,7 +66,6 @@ impl Parse for Element {
|
|||||||
if content.parse::<Token![,]>().is_err() {
|
if content.parse::<Token![,]>().is_err() {
|
||||||
missing_trailing_comma!(ident.span());
|
missing_trailing_comma!(ident.span());
|
||||||
}
|
}
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -211,7 +210,7 @@ pub enum ElementAttr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl ElementAttr {
|
impl ElementAttr {
|
||||||
pub fn flart(&self) -> Span {
|
pub fn start(&self) -> Span {
|
||||||
match self {
|
match self {
|
||||||
ElementAttr::AttrText { name, .. } => name.span(),
|
ElementAttr::AttrText { name, .. } => name.span(),
|
||||||
ElementAttr::AttrExpression { name, .. } => name.span(),
|
ElementAttr::AttrExpression { name, .. } => name.span(),
|
||||||
@@ -265,7 +264,7 @@ impl ToTokens for ElementAttrNamed {
|
|||||||
ElementAttr::CustomAttrText { name, value } => {
|
ElementAttr::CustomAttrText { name, value } => {
|
||||||
quote! {
|
quote! {
|
||||||
__cx.attr(
|
__cx.attr(
|
||||||
#name,
|
dioxus_elements::#el_name::#name.0,
|
||||||
#value,
|
#value,
|
||||||
None,
|
None,
|
||||||
false
|
false
|
||||||
@@ -275,7 +274,7 @@ impl ToTokens for ElementAttrNamed {
|
|||||||
ElementAttr::CustomAttrExpression { name, value } => {
|
ElementAttr::CustomAttrExpression { name, value } => {
|
||||||
quote! {
|
quote! {
|
||||||
__cx.attr(
|
__cx.attr(
|
||||||
#name,
|
dioxus_elements::#el_name::#name.0,
|
||||||
#value,
|
#value,
|
||||||
None,
|
None,
|
||||||
false
|
false
|
||||||
|
|||||||
Reference in new issue
Block a user