Skip to content

Commit 593503f

Browse files
committed
move blocker to nodeWillIndentChild
1 parent e387f69 commit 593503f

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/services/formatting/smartIndenter.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -450,10 +450,9 @@ namespace ts.formatting {
450450
case SyntaxKind.ConditionalExpression:
451451
case SyntaxKind.ArrayBindingPattern:
452452
case SyntaxKind.ObjectBindingPattern:
453-
case SyntaxKind.JsxElement:
454453
case SyntaxKind.JsxOpeningElement:
455454
case SyntaxKind.JsxSelfClosingElement:
456-
case SyntaxKind.JsxExpression:
455+
case SyntaxKind.JsxExpression:
457456
case SyntaxKind.MethodSignature:
458457
case SyntaxKind.CallSignature:
459458
case SyntaxKind.ConstructSignature:
@@ -469,6 +468,7 @@ namespace ts.formatting {
469468
return false;
470469
}
471470

471+
/* @internal */
472472
export function nodeWillIndentChild(parent: TextRangeWithKind, child: TextRangeWithKind, indentByDefault: boolean) {
473473
let childKind = child ? child.kind : SyntaxKind.Unknown;
474474
switch (parent.kind) {
@@ -486,6 +486,8 @@ namespace ts.formatting {
486486
case SyntaxKind.GetAccessor:
487487
case SyntaxKind.SetAccessor:
488488
return childKind !== SyntaxKind.Block;
489+
case SyntaxKind.JsxElement:
490+
return childKind !== SyntaxKind.JsxClosingElement;
489491
}
490492
// No explicit rule for given nodes so the result will follow the default value argument
491493
return indentByDefault;

0 commit comments

Comments
 (0)