@@ -115,7 +115,11 @@ fn gen_node_with_inner_gen<'a>(node: Node<'a>, context: &mut Context<'a>, inner_
115115 // keep the leading text, but leave the trailing text to be formatted if on a separate line
116116 let node_text = node. text_fast ( context. program ) ;
117117 let end_trim = node_text. trim_end ( ) ;
118- if node_text[ end_trim. len ( ) ..] . contains ( '\n' ) { end_trim } else { node_text }
118+ if node_text[ end_trim. len ( ) ..] . contains ( '\n' ) {
119+ end_trim
120+ } else {
121+ node_text
122+ }
119123 } else {
120124 node. text_fast ( context. program )
121125 } ;
@@ -1130,7 +1134,11 @@ fn gen_export_named_decl<'a>(node: &NamedExport<'a>, context: &mut Context<'a>)
11301134 items. push_sc ( sc ! ( ";" ) ) ;
11311135 }
11321136
1133- if should_single_line { with_no_new_lines ( items) } else { items }
1137+ if should_single_line {
1138+ with_no_new_lines ( items)
1139+ } else {
1140+ items
1141+ }
11341142}
11351143
11361144fn gen_function_decl < ' a > ( node : & FnDecl < ' a > , context : & mut Context < ' a > ) -> PrintItems {
@@ -1341,7 +1349,11 @@ fn gen_import_decl<'a>(node: &ImportDecl<'a>, context: &mut Context<'a>) -> Prin
13411349 items. push_sc ( sc ! ( ";" ) ) ;
13421350 }
13431351
1344- if should_single_line { with_no_new_lines ( items) } else { items }
1352+ if should_single_line {
1353+ with_no_new_lines ( items)
1354+ } else {
1355+ items
1356+ }
13451357}
13461358
13471359fn gen_import_equals_decl < ' a > ( node : & TsImportEqualsDecl < ' a > , context : & mut Context < ' a > ) -> PrintItems {
@@ -7777,7 +7789,11 @@ fn gen_close_paren_with_type<'a>(opts: GenCloseParenWithTypeOptions<'a>, context
77777789 items. extend ( generated_type_node) ;
77787790 items. push_info ( type_node_end_ln) ;
77797791
7780- if use_new_line_group { new_line_group ( items) } else { items }
7792+ if use_new_line_group {
7793+ new_line_group ( items)
7794+ } else {
7795+ items
7796+ }
77817797 } else {
77827798 items
77837799 } ;
0 commit comments