Fine tune regex used to detect inline script contexts

Related commit:
- b735ac6b6a
This commit is contained in:
Raymond Hill 2020-09-22 11:18:12 -04:00
parent 2533735c49
commit 1e91fb8733
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 1 additions and 1 deletions

View File

@ -221,7 +221,7 @@
}
const reDocURL = new RegExp(docURL.replace(reRegexEscape, '\\$&'), 'g');
const stack = err.stack
.replace(/^.*?\b[gs]et\b[^\n\r]+?[\n\r]*/m, '')
.replace(/^.*?\b[gs]et\b[^\n\r]+?(?:[\n\r]+|$)/m, '')
.replace(reDocURL, '<inline-script>');
const r = reNeedle.test(stack);
if (