Skip to content

[JS/HTML] Each save indents the code further. #5499

@8483

Description

@8483

The following code:

function foo() {
    return `
        <div>
            <p>Text</p>
        </div>
    `;
}

When I save, becomes this...

function foo() {
    return `
            <div>
                <p>Text</p>
            </div>
        `;
}

Saving again does this...

function foo() {
    return `
                <div>
                    <p>Text</p>
                </div>
            `;
}

Why is this happening? It wasn't an issue a day ago.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:multiparserIssues with printing one language inside another, like CSS-in-JSlang:htmlIssues affecting HTML (and SVG but not JSX)lang:javascriptIssues affecting JSlocked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.priority:highCode is printed in a way that alters the AST, breaks syntax, or is a significant regression. Urgent!status:has prIssues with an accompanying pull request. These issues will probably be fixed soon!

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions