-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: caret position was incorrect (#14984)
- Loading branch information
1 parent
c61c376
commit 2b4e793
Showing
7 changed files
with
184 additions
and
31 deletions.
There are no files selected for viewing
93 changes: 93 additions & 0 deletions
93
packages/vite/src/node/__tests__/__snapshots__/utils.spec.ts.snap
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html | ||
|
||
exports[`generateCodeFrames > end 1`] = ` | ||
" | ||
1 | import foo from './foo' | ||
| ^ | ||
2 | foo() | ||
" | ||
`; | ||
|
||
exports[`generateCodeFrames > end 2`] = ` | ||
" | ||
1 | import foo from './foo' | ||
| ^^^^^^^^^^^^^^^^^^^^^^^ | ||
2 | foo() | ||
" | ||
`; | ||
|
||
exports[`generateCodeFrames > end 3`] = ` | ||
" | ||
1 | import foo from './foo' | ||
| ^^^^^^^^^^^^^^^^^^^^^^^ | ||
2 | foo() | ||
| ^^^^^ | ||
" | ||
`; | ||
|
||
exports[`generateCodeFrames > range 1`] = ` | ||
" | ||
1 | | ||
2 | import foo from './foo' | ||
3 | | ||
| ^ | ||
4 | foo() | ||
5 | | ||
" | ||
`; | ||
|
||
exports[`generateCodeFrames > start with number 1`] = ` | ||
" | ||
1 | import foo from './foo' | ||
| ^ | ||
2 | foo() | ||
" | ||
`; | ||
|
||
exports[`generateCodeFrames > start with number 2`] = ` | ||
" | ||
1 | import foo from './foo' | ||
| ^ | ||
2 | foo() | ||
" | ||
`; | ||
|
||
exports[`generateCodeFrames > start with number 3`] = ` | ||
" | ||
1 | import foo from './foo' | ||
2 | foo() | ||
| ^ | ||
" | ||
`; | ||
|
||
exports[`generateCodeFrames > start with postion 1`] = ` | ||
" | ||
1 | import foo from './foo' | ||
| ^ | ||
2 | foo() | ||
" | ||
`; | ||
|
||
exports[`generateCodeFrames > start with postion 2`] = ` | ||
" | ||
1 | import foo from './foo' | ||
| ^ | ||
2 | foo() | ||
" | ||
`; | ||
|
||
exports[`generateCodeFrames > start with postion 3`] = ` | ||
" | ||
1 | import foo from './foo' | ||
2 | foo() | ||
| ^ | ||
" | ||
`; | ||
|
||
exports[`generateCodeFrames > works with CRLF 1`] = ` | ||
" | ||
1 | import foo from './foo' | ||
2 | foo() | ||
| ^ | ||
" | ||
`; |
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
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
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