Skip to content

Commit

Permalink
Merge pull request #1612 from SnowCait/fix-url-regexp
Browse files Browse the repository at this point in the history
Fix URL regexp
  • Loading branch information
SnowCait authored Feb 2, 2025
2 parents 5bec903 + 67b9b2d commit 7f5d558
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/src/lib/Content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class Content {
...content.matchAll(
/\bnostr:((note|npub|naddr|nevent|nprofile)1\w{6,})\b|#\[\d+\]/g
),
...content.matchAll(/(https|wss|ws):\/\/\S+/g),
...content.matchAll(/(?<=^|\s)(https|wss|ws):\/\/\S+/g),
...content.matchAll(/NIP-[0-9]{2,}/g)
].sort((x, y) => {
if (x.index === undefined || y.index === undefined) {
Expand Down

0 comments on commit 7f5d558

Please sign in to comment.