From affe2c85082d5d3edc2cb66e3edd995b518b1fb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Ferreiro?= Date: Wed, 14 Dec 2022 15:42:58 +0000 Subject: [PATCH] fix android runtime --- src/lib/strings.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/strings.ts b/src/lib/strings.ts index 0474c330..2616141d 100644 --- a/src/lib/strings.ts +++ b/src/lib/strings.ts @@ -75,7 +75,7 @@ export function extractEntities( let ents: Entity[] = [] { // mentions - const re = /(^|\s|\()(@)([a-zA-Z0-9\.-]+)(\b)/dg + const re = /(^|\s|\()(@)([a-zA-Z0-9\.-]+)(\b)/g while ((match = re.exec(text))) { if (knownHandles && !knownHandles.has(match[3])) { continue // not a known handle @@ -95,7 +95,7 @@ export function extractEntities( { // links const re = - /(^|\s|\()((https?:\/\/[\S]+)|((?[a-z][a-z0-9]*(\.[a-z0-9]+)+)[\S]*))/dgm + /(^|\s|\()((https?:\/\/[\S]+)|((?[a-z][a-z0-9]*(\.[a-z0-9]+)+)[\S]*))/gm while ((match = re.exec(text))) { let value = match[2] if (!value.startsWith('http')) {