We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7376e48 commit bcde562Copy full SHA for bcde562
2 files changed
src/services/formatting/smartIndenter.ts
@@ -428,6 +428,7 @@ namespace ts.formatting {
428
case SyntaxKind.ConditionalExpression:
429
case SyntaxKind.ArrayBindingPattern:
430
case SyntaxKind.ObjectBindingPattern:
431
+ case SyntaxKind.JsxElement:
432
return true;
433
}
434
return false;
tests/cases/fourslash/formattingJsxElements.ts
@@ -0,0 +1,19 @@
1
+/// <reference path='fourslash.ts' />
2
+
3
+//@Filename: file.tsx
4
+////function () {
5
+//// return (
6
+//// <div className="commentBox" >
7
+////Hello, World!/*autoformat*/
8
+/////*indent*/
9
+//// </div>
10
+//// )
11
+////}
12
+////
13
14
15
+format.document();
16
+goTo.marker("autoformat");
17
+verify.currentLineContentIs(' Hello, World!');
18
+goTo.marker("indent");
19
+verify.indentationIs(12);
0 commit comments