We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In a similar vein to #12491 (which I am still intending to fix), I found a misplaced cursorOffset issue with code like this
<>a• <div>hi</div> </>
(where • denotes the given cursor position)
•
When passed into prettier we get:
<>• a<div>hi</div> </>
Which is unexpected, because the a correctly moves down, but the cursor stays up.
Here is code for testing it:
const prettier = require("prettier"); prettier.formatWithCursor(["<>a", " <div>hi</div>", "</>"].join("\n"), { cursorOffset: 3, parser: 'babel' });
and the runkit to see it in the browser: https://runkit.com/gregoor/prettier-jsx-cursor-offset-bug
The text was updated successfully, but these errors were encountered:
JSXText
fisker
Successfully merging a pull request may close this issue.
In a similar vein to #12491 (which I am still intending to fix), I found a misplaced cursorOffset issue with code like this
(where
•
denotes the given cursor position)When passed into prettier we get:
Which is unexpected, because the a correctly moves down, but the cursor stays up.
Here is code for testing it:
and the runkit to see it in the browser:
https://runkit.com/gregoor/prettier-jsx-cursor-offset-bug
The text was updated successfully, but these errors were encountered: