diff options
author | João Ferreiro <ferreiro@pinkroom.dev> | 2022-12-14 15:42:58 +0000 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2022-12-19 19:19:00 -0600 |
commit | affe2c85082d5d3edc2cb66e3edd995b518b1fb5 (patch) | |
tree | d5125ea4b3cdf054d58fcd4adf19809590f4cf12 /src | |
parent | 0726350570f563c7a828326e66ca01d5cc7ae744 (diff) | |
download | voidsky-affe2c85082d5d3edc2cb66e3edd995b518b1fb5.tar.zst |
fix android runtime
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/strings.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/strings.ts b/src/lib/strings.ts index 0474c330d..2616141d6 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]+)|((?<domain>[a-z][a-z0-9]*(\.[a-z0-9]+)+)[\S]*))/dgm + /(^|\s|\()((https?:\/\/[\S]+)|((?<domain>[a-z][a-z0-9]*(\.[a-z0-9]+)+)[\S]*))/gm while ((match = re.exec(text))) { let value = match[2] if (!value.startsWith('http')) { |