Skip to content

auto indenting is wrong in JavaScript mode in a multi-line template string? #6442

Closed
@greggman

Description

@greggman

version 5.58.1

If you have code like this

const s = `
{  //  on the next line type 4 spaces and then a 
`;

// what should happen? the { should be 4 spaces out
// what happens instead, the spaces are removed

And follow the directions above, type [space] [space] [space] [space] [{] the spaces are deleted. That seems unintentional?

In other words I want this

const s = `
{
    {

but I get this

const s = `
{
{

repo:

https://jsgist.org/?src=7e596608ea9ebfb166cfd21467accbfc

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions