-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Overlapping formatting edits returned for jsx #30898
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
Comments
It looks like we have always shipped overlapping edits in the formatter: #6666 When we consume edits ourselves in tests, we assume the order is important and edit the TextChanges to take into account the overlapping edits, which it seems is left to a client to do (at this point, I'd assume that clients all have the same system) Because we consume in our tests this way, we have no idea how many places there are overlapping edits and so fixing it locally isn't really a good idea. The right solution for this is to have a merging pass before we pass out the TextChanges to clients. |
Just tested using the example and it looks like this no longer happens with 4.5-rc |
TypeScript Version: 3.5.0-dev.20190412
Search Terms:
Code
Run format on the following js (note that the whitespace is significant):
Bug
The returned response contains overlapping edits:
Playground Link:
Related Issues:
The text was updated successfully, but these errors were encountered: