nip27: fix trailing / in urls.

This commit is contained in:
fiatjaf
2025-12-11 21:23:32 -03:00
parent e290f98a86
commit 0235b490fa
4 changed files with 20 additions and 5 deletions

View File

@@ -41,7 +41,7 @@ export type Block =
}
const noCharacter = /\W/m
const noURLCharacter = /\W |\W$|$|,| /m
const noURLCharacter = /[^\w\/] |[^\w\/]$|$|,| /m
const MAX_HASHTAG_LENGTH = 42
export function* parse(content: string | NostrEvent): Iterable<Block> {