Skip to content

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

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>
)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

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