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
I mentioned in my PR (#8499) that the code previews don't work and hypothesised I was doing something wrong.
Looking at the line numbers it was generating, they're all nonsensical:
line: err.loc.start.line + err.loc.start.offset,
I don't get what this is supposed to do, but it generates line numbers like 1483 in a 155 line file!
1483
155
Looking at the Vue SFC compiler's code
https://github.com/vuejs/core/blob/fbd697a4b6c238147d661026836314862fd09221/packages/compiler-sfc/src/compileTemplate.ts#L307-L312
It's already adjusting the line numbers by an offset, and indeed if I change the code to not add this offset, the code previews start to work fine:
if (err.loc) { diagnostic.codeFrames = [{ filePath, codeHighlights: [{ start: { line: err.loc.start.line, column: err.loc.start.column }, end: { line: err.loc.end.line, column: err.loc.end.column } }] }]; }
The text was updated successfully, but these errors were encountered:
Fix parcel-bundler#8500 by not adding offset to line numbers
7d8fc81
fd7c2b7
d6f5063
Fix #8500 by not adding offset to line numbers (#8501)
cf3a752
Successfully merging a pull request may close this issue.
I mentioned in my PR (#8499) that the code previews don't work and hypothesised I was doing something wrong.
Looking at the line numbers it was generating, they're all nonsensical:
I don't get what this is supposed to do, but it generates line numbers like
1483
in a155
line file!Looking at the Vue SFC compiler's code
https://github.com/vuejs/core/blob/fbd697a4b6c238147d661026836314862fd09221/packages/compiler-sfc/src/compileTemplate.ts#L307-L312
It's already adjusting the line numbers by an offset, and indeed if I change the code to not add this offset, the code previews start to work fine:
The text was updated successfully, but these errors were encountered: