Skip to content

Commit

Permalink
fix: code frame tabs indent (fix: #1679) (#1680)
Browse files Browse the repository at this point in the history
  • Loading branch information
skarab42 committed Jul 19, 2022
1 parent d553031 commit f728ff6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vitest/src/node/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ export function generateCodeFrame(
if (lineLength > 200)
return ''

res.push(lineNo(j + 1) + cliTruncate(lines[j], columns - 5 - indent))
res.push(lineNo(j + 1) + cliTruncate(lines[j].replace(/\t/g, ' '), columns - 5 - indent))

if (j === i) {
// push underline
Expand Down

0 comments on commit f728ff6

Please sign in to comment.