From f3e9fe56a0319ac4acf1a7d97bb3fb04406390d9 Mon Sep 17 00:00:00 2001 From: Yu Cong Date: Fri, 3 Oct 2025 23:15:04 +0800 Subject: [PATCH] make web-ext happy --- web/autolinker.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/web/autolinker.js b/web/autolinker.js index 85b7e8e..8d6b9df 100644 --- a/web/autolinker.js +++ b/web/autolinker.js @@ -136,8 +136,7 @@ class Autolinker { static findLinks(text) { // Regex can be tested and verified at https://regex101.com/r/rXoLiT/2. this.#regex ??= - /\b(?:https?:\/\/|mailto:|www\.)(?:[\S--[\p{P}<>]]|\/|[\S--[\[\]]]+[\S--[\p{P}<>]])+|\b[\S--[@\p{Ps}\p{Pe}<>]]+@([\S--[\p{P}<>]]+(?:\.[\S--[\p{P}<>]]+)+)/gmv; - + /\b(?:https?:\/\/|mailto:|www\.)(?:[^\s\p{P}<>]|\/|[^\s\[\]]+[^\s\p{P}<>])+|\b[^\s@\p{Ps}\p{Pe}<>]+@([^\s\p{P}<>]+(?:\.[^\s\p{P}<>]+)+)/gmu; const [normalizedText, diffs] = normalize(text, { ignoreDashEOL: true }); const matches = normalizedText.matchAll(this.#regex); const links = [];