Fix web links addon support in Edge
regex.flags isn't supported on Edge Fixes #2417
This commit is contained in:
@@ -211,7 +211,7 @@ export class Linkifier implements ILinkifier {
|
|||||||
*/
|
*/
|
||||||
private _doLinkifyRow(rowIndex: number, text: string, matcher: ILinkMatcher): void {
|
private _doLinkifyRow(rowIndex: number, text: string, matcher: ILinkMatcher): void {
|
||||||
// clone regex to do a global search on text
|
// clone regex to do a global search on text
|
||||||
const rex = new RegExp(matcher.regex.source, matcher.regex.flags + 'g');
|
const rex = new RegExp(matcher.regex.source, (matcher.regex.flags || '') + 'g');
|
||||||
let match;
|
let match;
|
||||||
let stringIndex = -1;
|
let stringIndex = -1;
|
||||||
while ((match = rex.exec(text)) !== null) {
|
while ((match = rex.exec(text)) !== null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user