fix: detection of f-string formatting in components

This commit is contained in:
Jonathan Kelley committed 2022-01-10 01:20:03 -05:00
1 parent 5b882ac409
commit 90abd9c9a0
1 file changed
+2 -2
+2 -2
View File
@@ -181,7 +181,7 @@ impl Parse for ComponentField {
return Ok(Self { name, content }); return Ok(Self { name, content });
} }
if name.to_string() == "key" { if name == "key" {
let content = ContentField::ManExpr(input.parse()?); let content = ContentField::ManExpr(input.parse()?);
return Ok(Self { name, content }); return Ok(Self { name, content });
} }
@@ -221,7 +221,7 @@ fn is_literal_foramtted(lit: &LitStr) -> bool {
while let Some(next) = chars.next() { while let Some(next) = chars.next() {
if next == '{' { if next == '{' {
let nen = chars.next(); let nen = chars.next();
if nen == Some('{') { if nen != Some('{') {
return true; return true;
} }
} }