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
fix(code-frame): do not pad gutter of empty lines #12567
Conversation
@@ -105,8 +105,8 @@ describe("@babel/code-frame", function () { | |||
test("opts.highlightCode with multiple columns and lines", function () { | |||
// prettier-ignore | |||
const rawLines = [ | |||
"function a(b, c) {", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ergh, shouldn't matter, I thought for a moment the trailing spaces were inside the string. So I'll leave it as is for now unless you want me to roll back
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm surprised that it wasn't already fixed by prettier 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the ignore above it I assume 🙂
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/36577/ |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 0d68324:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@SimenB I pushed a workaround since the Jest e2e test is failing (as expected). |
38a5267
to
7b9ed83
Compare
@nicolo-ribaudo if you run against jest@master I can just apply a patch to the local install of |
7b9ed83
to
1eb69a5
Compare
I don't want to force it on you since it's just caused by our tests, I just have to tune the regexp to make it pass 😅 |
d80ebeb
to
e0421aa
Compare
e0421aa
to
0d68324
Compare
I'm late for this, when we replace the Before
After
The first one looks more "real" 😄 Diff on Prettier PR, https://github.com/prettier/prettier/pull/10226/files#diff-802d6e48b5b7304cbc7abcb6aa1690a5419eecec01b4d971926a8ebd94548a04R85 Not important, but just want let you know. |
ah it's released, nice 👍 PR updating in Jest if you wanna remove the hack made to the e2e tests here: jestjs/jest#11048 |
I don't think the trailing space adds anything.