@@ -103,25 +103,25 @@ pub trait FormatWrite<'ast, T = ()> {
103103
104104impl < ' a > FormatWrite < ' a > for AstNode < ' a , IdentifierName < ' a > > {
105105 fn write ( & self , f : & mut Formatter < ' _ , ' a > ) -> FormatResult < ( ) > {
106- write ! ( f, text ( self . name( ) . as_str( ) ) )
106+ write ! ( f, text_without_whitespace ( self . name( ) . as_str( ) ) )
107107 }
108108}
109109
110110impl < ' a > FormatWrite < ' a > for AstNode < ' a , IdentifierReference < ' a > > {
111111 fn write ( & self , f : & mut Formatter < ' _ , ' a > ) -> FormatResult < ( ) > {
112- write ! ( f, text ( self . name( ) . as_str( ) ) )
112+ write ! ( f, text_without_whitespace ( self . name( ) . as_str( ) ) )
113113 }
114114}
115115
116116impl < ' a > FormatWrite < ' a > for AstNode < ' a , BindingIdentifier < ' a > > {
117117 fn write ( & self , f : & mut Formatter < ' _ , ' a > ) -> FormatResult < ( ) > {
118- write ! ( f, text ( self . name( ) . as_str( ) ) )
118+ write ! ( f, text_without_whitespace ( self . name( ) . as_str( ) ) )
119119 }
120120}
121121
122122impl < ' a > FormatWrite < ' a > for AstNode < ' a , LabelIdentifier < ' a > > {
123123 fn write ( & self , f : & mut Formatter < ' _ , ' a > ) -> FormatResult < ( ) > {
124- write ! ( f, text ( self . name( ) . as_str( ) ) )
124+ write ! ( f, text_without_whitespace ( self . name( ) . as_str( ) ) )
125125 }
126126}
127127
@@ -1095,7 +1095,7 @@ impl<'a> FormatWrite<'a> for AstNode<'a, RegExpLiteral<'a>> {
10951095 flags. sort_unstable ( ) ;
10961096 let flags = flags. iter ( ) . collect :: < String > ( ) ;
10971097 let s = StringBuilder :: from_strs_array_in ( [ pattern, "/" , & flags] , f. context ( ) . allocator ( ) ) ;
1098- write ! ( f, text( s. into_str( ) , ) )
1098+ write ! ( f, text( s. into_str( ) ) )
10991099 }
11001100}
11011101
0 commit comments