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

📝 Removed escapes are taken into account to determine if the enclosing group must be expanded #1169

Closed
1 task done
Conaclos opened this issue Dec 13, 2023 · 2 comments · Fixed by #1187
Closed
1 task done
Assignees
Labels
A-Formatter Area: formatter L-JavaScript Language: JavaScript and super languages S-Bug-confirmed Status: report has been confirmed as a valid bug

Comments

@Conaclos
Copy link
Member

Conaclos commented Dec 13, 2023

Environment information

Playground

Configuration

Default configuration

Description

Biome remove unnecessary escape. However, it doesn't take the reduced length into account to evaluate if it has to expand the enclosing group. This leads to [non-idempotent formatting]( corresponding divergence).

Playground link

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@Conaclos Conaclos added A-Formatter Area: formatter L-JavaScript Language: JavaScript and super languages S-Bug-confirmed Status: report has been confirmed as a valid bug labels Dec 13, 2023
@Conaclos Conaclos changed the title 📝 Don't take removed escape characters into account when assessing if the group has to expand 📝 Removed escapes are taken into account to determine if the enclosing group must be expanded Dec 13, 2023
@kalleep
Copy link
Contributor

kalleep commented Dec 13, 2023

I can take a look at this one!

@Conaclos
Copy link
Member Author

@kalleep That was fast ❤️‍🔥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Formatter Area: formatter L-JavaScript Language: JavaScript and super languages S-Bug-confirmed Status: report has been confirmed as a valid bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants