Improve LLLindenText parsing

This commit is contained in:
Casper Warden
2023-11-20 20:44:21 +00:00
parent a8f83ef126
commit 9cbc80e1ef
7 changed files with 57 additions and 40 deletions

View File

@@ -978,4 +978,15 @@ export class Utils
});
});
}
public static getNotecardLine(lineObj: {
lines: string[],
lineNum: number,
pos: number
}): string
{
const line = lineObj.lines[lineObj.lineNum++];
lineObj.pos += Buffer.byteLength(line) + 1;
return line.replace(/\r/, '').trim().replace(/[\t ]+/g, ' ');
}
}