diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-01-18 18:14:46 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-18 18:14:46 -0600 |
commit | 6588961d2e075ed047857d71346e3a63282ee58f (patch) | |
tree | 54c75536bb623ccc14d26f9a12e0e42c9dd481b9 /src/lib/strings.ts | |
parent | 27ee550d15321b17200f844038e8d6e0a8975139 (diff) | |
download | voidsky-6588961d2e075ed047857d71346e3a63282ee58f.tar.zst |
Update composer to preview external link cards (#52)
* Fetch external link metadata during compose so the user can preview and remove the embed * Add missing mocks * Update tests to match recent changes
Diffstat (limited to 'src/lib/strings.ts')
-rw-r--r-- | src/lib/strings.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/strings.ts b/src/lib/strings.ts index 77d8298ac..04d8656f7 100644 --- a/src/lib/strings.ts +++ b/src/lib/strings.ts @@ -96,7 +96,7 @@ export function extractEntities( { // links const re = - /(^|\s|\()((https?:\/\/[\S]+)|((?<domain>[a-z][a-z0-9]*(\.[a-z0-9]+)+)[\S]*))/gm + /(^|\s|\()((https?:\/\/[\S]+)|((?<domain>[a-z][a-z0-9]*(\.[a-z0-9]+)+)[\S]*))/gim while ((match = re.exec(text))) { let value = match[2] if (!value.startsWith('http')) { |