Add 1024 character limit to web links addon

Fixes #4250
This commit is contained in:
Daniel Imms
2022-11-02 06:45:25 -07:00
committed by GitHub
parent 02fa38c334
commit 6c29864847
@@ -47,6 +47,12 @@ export class LinkComputer {
const [line, startLineIndex] = LinkComputer._translateBufferLineToStringWithWrap(y - 1, false, terminal);
// Don't try if the wrapped line if excessively large as the regex matching will block the main
// thread.
if (line.length > 1024) {
return [];
}
let match;
let stringIndex = -1;
const result: ILink[] = [];