Skip to content

Commit bcc4eab

Browse files
committed
fix error positioning
1 parent 3f1dcd1 commit bcc4eab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dictionary/build.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ function displayError(
9898
currentLine = currentPosition = nextLine;
9999
}
100100
}
101-
const line = source.slice(0, startLine).split(/\n(?!$)/).length;
101+
const line = source.slice(0, startLine).split(/\n(?!$)/).length + 1;
102102
const column = position - startLine + 1;
103103
console.error(` at %c${SOURCE}:${line}:${column}`, sourceStyle);
104104
console.error();

0 commit comments

Comments
 (0)