We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d55d57 commit 78eda8cCopy full SHA for 78eda8c
dictionary/build.ts
@@ -101,7 +101,7 @@ function displayError(
101
currentLine = currentPosition = nextLine;
102
}
103
104
- const line = source.slice(0, startLine).split(/\n(?!$)/).length + 1;
+ const line = source.slice(0, startLine).match(/\n/g)?.length ?? 1;
105
const column = position - startLine + 1;
106
console.error(` at %c${SOURCE}:${line}:${column}`, sourceStyle);
107
console.error();
0 commit comments