Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spaces removed from nested template literals in some cases #108

Open
ilkkave opened this issue May 25, 2022 · 0 comments
Open

Spaces removed from nested template literals in some cases #108

ilkkave opened this issue May 25, 2022 · 0 comments

Comments

@ilkkave
Copy link

ilkkave commented May 25, 2022

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`}`);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants