Replace all instead of just replace

This commit is contained in:
Andras Schmelczer 2025-11-22 19:57:52 +00:00
commit 28a72513d1

View file

@ -13,7 +13,7 @@ export function lineAndColumnToPosition(
line: number,
column: number
): number {
const lines = text.replace("\r", "").split("\n");
const lines = text.replaceAll("\r", "").split("\n");
if (line >= lines.length) {
throw new Error(`Line number ${line} is out of range.`);