forked from prettier/prettier
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Translate cursor relative to nearest node, not SourceElement (prettie…
…r#1989) * Add test demonstrating SourceElement-relative cursor translation See prettier#1981 (comment) * Translate cursor relative to nearest node, not SourceElement This partially address prettier#1981 See prettier#1981 (comment) * Add test demonstrating incorrect cursor translation Since the `cursorOffset` option (introduced in prettier#1637) works by tracking the cursor position relative to an AST node (rather than a CST token), it can produce incorrect results. See prettier#1981
- Loading branch information
1 parent
19bd2a3
commit c863cbe
Showing
2 changed files
with
30 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters