File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -496,10 +496,19 @@ namespace ts.formatting {
496
496
case SyntaxKind . WhileKeyword :
497
497
case SyntaxKind . AtToken :
498
498
return indentation ;
499
- default :
500
- // if token line equals to the line of containing node (this is a first token in the node) - use node indentation
501
- return nodeStartLine !== line ? indentation + getEffectiveDelta ( delta , container ) : indentation ;
499
+ case SyntaxKind . SlashToken :
500
+ case SyntaxKind . GreaterThanToken : {
501
+ if ( container . kind === SyntaxKind . JsxOpeningElement ||
502
+ container . kind === SyntaxKind . JsxClosingElement ||
503
+ container . kind === SyntaxKind . JsxSelfClosingElement
504
+ ) {
505
+ return indentation ;
506
+ }
507
+ break ;
508
+ }
502
509
}
510
+ // if token line equals to the line of containing node (this is a first token in the node) - use node indentation
511
+ return nodeStartLine !== line ? indentation + getEffectiveDelta ( delta , container ) : indentation ;
503
512
} ,
504
513
getIndentation : ( ) => indentation ,
505
514
getDelta : child => getEffectiveDelta ( delta , child ) ,
You can’t perform that action at this time.
0 commit comments