Skip to content

Commit

Permalink
Fix the alignment of errors when the source code used tab for indenta…
Browse files Browse the repository at this point in the history
…tion.

Signed-off-by: Jeremy Wickersheimer <jwickers@gmail.com>
  • Loading branch information
jwickers committed Jul 17, 2022
1 parent 963100f commit 00a8316
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/astro/src/cli/check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export async function check(astroConfig: AstroConfig) {
let str = diag.text.substring(startOffset, endOffset - 1);
const lineNumStr = d.range.start.line.toString();
const lineNumLen = lineNumStr.length;
console.error(`${bgWhite(black(lineNumStr))} ${str}`);
console.error(`${bgWhite(black(lineNumStr))} ${str.replaceAll('\t', ' ')}`);
let tildes = generateString('~', d.range.end.character - d.range.start.character);
let spaces = generateString(' ', d.range.start.character + lineNumLen - 1);
console.error(` ${spaces}${bold(red(tildes))}\n`);
Expand Down

0 comments on commit 00a8316

Please sign in to comment.