feat: post & reply (#5)

This commit is contained in:
Cody Tseng 2024-11-09 22:28:10 +08:00 committed by GitHub
parent 5b0abcf380
commit 53f9f6240f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
25 changed files with 483 additions and 98 deletions

View file

@ -97,7 +97,7 @@ function preprocess(content: string) {
})
const embeddedNotes: string[] = []
const embeddedNoteRegex = /(nostr:note1[a-z0-9]{58}|nostr:nevent1[a-z0-9]+)/g
const embeddedNoteRegex = /nostr:(note1[a-z0-9]{58}|nevent1[a-z0-9]+|naddr1[a-z0-9]+)/g
;(c.match(embeddedNoteRegex) || []).forEach((note) => {
c = c.replace(note, '').trim()
embeddedNotes.push(note)