File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -496,10 +496,19 @@ namespace ts.formatting {
496496 case SyntaxKind . WhileKeyword :
497497 case SyntaxKind . AtToken :
498498 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+ }
502509 }
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 ;
503512 } ,
504513 getIndentation : ( ) => indentation ,
505514 getDelta : child => getEffectiveDelta ( delta , child ) ,
You can’t perform that action at this time.
0 commit comments