@@ -1214,14 +1214,14 @@ function printAttrs(path, options, print, { inline = false } = {}) {
12141214 }
12151215 path . each ( ( agPath ) => {
12161216 const attrGroup = [ "#[" ] ;
1217- if ( allAttrs . length > 0 ) {
1218- allAttrs . push ( inline ? " " : hardline ) ;
1217+ if ( ! inline && allAttrs . length > 0 ) {
1218+ allAttrs . push ( hardline ) ;
12191219 }
1220- attrGroup . push ( ifBreak ( softline ) ) ;
1220+ attrGroup . push ( softline ) ;
12211221 agPath . each ( ( attrPath ) => {
12221222 const attrNode = attrPath . getValue ( ) ;
12231223 if ( attrGroup . length > 2 ) {
1224- attrGroup . push ( "," , ifBreak ( softline , " " ) ) ;
1224+ attrGroup . push ( "," , line ) ;
12251225 }
12261226 const attrStmt = [ attrNode . name ] ;
12271227 if ( attrNode . args . length > 0 ) {
@@ -1234,10 +1234,9 @@ function printAttrs(path, options, print, { inline = false } = {}) {
12341234 concat ( [
12351235 indent ( concat ( attrGroup ) ) ,
12361236 ifBreak ( shouldPrintComma ( options , "8.0" ) ? "," : "" ) ,
1237- ifBreak ( softline ) ,
1238- "]" ,
12391237 softline ,
1240- inline ? " " : "" ,
1238+ "]" ,
1239+ inline ? ifBreak ( softline , " " ) : "" ,
12411240 ] )
12421241 )
12431242 ) ;
0 commit comments