Remove claim, untrue since over 5 years ago, that cursorOffset is incompatible with rangeStart/rangeEnd#15750
Merged
thorn0 merged 12 commits intoprettier:mainfrom Dec 8, 2023
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
In May 2017, @josephfrazier added the
cursorOffsetoption. This initial implementation ofcursorOffsetwas incompatible withrangeStart/rangeEnd, and so Joseph added lines to the docs aboutcursorOffsetandrangeStart/rangeEndsaying:and
This was all true and reasonable at the time, but the next year, in April 2018, the actual incompatibility was fixed by @ds300 in #4397. But I guess that neither he nor anyone who reviewed his PR noticed the documentation about the incompatibility still exists, because it wasn't removed at the time and still exists to this day, even though David's fix made it obsolete.
I suggest we finally remove those false statements, 5 years later. This PR does that. :)
Checklist
docs/directory). - N/Achangelog_unreleased/*/XXXX.mdfile followingchangelog_unreleased/TEMPLATE.md.✨Try the playground for this PR✨