Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

Commit

Permalink
rebase and fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico committed Jan 31, 2022
1 parent a57c8c2 commit 92dc343
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion crates/rome_formatter/src/cst.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ use rslint_parser::ast::{
JsNullLiteralExpression, JsNumberLiteralExpression, JsObjectExpression, JsParameters,
JsPropertyClassMember, JsPropertyObjectMember, JsReturnStatement, JsScript,
JsSequenceExpression, JsSetterClassMember, JsShorthandPropertyObjectMember, JsSpread,
JsStatementList, JsStringLiteralExpression, JsSwitchStatement, JsTryStatement,
JsStatementList, JsStaticInitializationBlockClassMember, JsStringLiteralExpression,
JsSwitchStatement, JsTemplate, JsTemplateChunkElement, JsTemplateElement, JsTryStatement,
JsUnknownAssignment, JsUnknownBinding, JsUnknownExpression, JsUnknownImportAssertionEntry,
JsUnknownMember, JsUnknownNamedImportSpecifier, JsUnknownParameter, JsUnknownStatement,
JsVariableDeclaration, JsVariableDeclarations, JsVariableStatement, JsWhileStatement,
Expand Down
2 changes: 1 addition & 1 deletion crates/rome_formatter/src/ts/expressions/template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use rslint_parser::ast::JsTemplate;
impl ToFormatElement for JsTemplate {
fn to_format_element(&self, formatter: &Formatter) -> FormatResult<FormatElement> {
let tag = if let Some(tag) = self.tag() {
formatter.format_node(tag)?
formatter.format_node(&tag)?
} else {
empty_element()
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use rslint_parser::ast::JsTemplateElement;
impl ToFormatElement for JsTemplateElement {
fn to_format_element(&self, formatter: &Formatter) -> FormatResult<FormatElement> {
let dollar_curly = formatter.format_token(&self.dollar_curly_token()?)?;
let expression = formatter.format_node(self.expression()?)?;
let expression = formatter.format_node(&self.expression()?)?;
let r_curly = formatter.format_token(&self.r_curly_token()?)?;
Ok(format_elements![dollar_curly, expression, r_curly])
}
Expand Down

0 comments on commit 92dc343

Please sign in to comment.