Skip to content

JSX formatting does not de-indent closing tag with text body #20766

Closed
@mjbvz

Description

@mjbvz

From microsoft/vscode#40454 (comment)

TypeScript Version: 2.7.0-dev.20171214

Code

(
    <div>
        text
        </div>
)

Run format

Expected behavior:

(
    <div>
        text
    </div>
)

Actual behavior:
No change. Content remains:

(
    <div>
        text
        </div>
)

The </div> is de-indented if the body is a tag instead of text:

(
    <div>
        <span />
        </div>
)

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptDomain: FormatterThe issue relates to the built-in formatterFix AvailableA PR has been opened for this issueVS Code PriorityCritical issues that VS Code needs fixed in the current TypeScript milestone

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions