fix tests

This commit is contained in:
Jonathan Kelley committed 2024-01-10 23:17:01 -08:00
1 parent c5dfbd7913
commit f1e8faffb5
6 files changed
+77 -44

No files matched your search

+3
View File
@@ -237,6 +237,9 @@ impl Writer<'_> {
ElementAttrValue::AttrLiteral(value) => {
write!(self.out, "{value}", value = ifmt_to_string(value))?;
}
ElementAttrValue::Shorthand(value) => {
write!(self.out, "{value}",)?;
}
ElementAttrValue::AttrExpr(value) => {
let out = prettyplease::unparse_expr(value);
let mut lines = out.split('\n').peekable();
+1
View File
@@ -142,6 +142,7 @@ impl<'a> Writer<'a> {
}
ElementAttrValue::AttrLiteral(lit) => ifmt_to_string(lit).len(),
ElementAttrValue::AttrExpr(expr) => expr.span().line_length(),
ElementAttrValue::Shorthand(expr) => expr.span().line_length(),
ElementAttrValue::EventTokens(tokens) => {
let location = Location::new(tokens.span().start());