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