Skip to content

Spaces removed from nested template literals in some cases #108

Open
@ilkkave

Description

@ilkkave

In certain cases nested template literals seem to cause some spaces being removed.

These seem to work fine, and the minified output is the same:

console.log(`aa ${`bb cc`}`);
console.log(`aa ${true ? `bb cc` : `bb cc`}`);
console.log(`aa ${`a bb cc`}`);

In these cases some spaces get removed:

console.log(`aa ${`, bb cc`}`);
console.log(`aa ${`. bb cc`}`);

When minified:

console.log(`aa ${`,bb cc`}`);
console.log(`aa ${`.bb cc`}`);

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions