diff --git a/src/lib/components/Notifications.svelte b/src/lib/components/Notifications.svelte index e18b971..b463ba6 100644 --- a/src/lib/components/Notifications.svelte +++ b/src/lib/components/Notifications.svelte @@ -22,6 +22,7 @@ import { formatDate, neventEncode } from "$lib/utils"; import { NDKRelaySetFromNDK } from "$lib/utils/nostrUtils"; import { parseBasicmarkup } from "$lib/utils/markup/basicMarkupParser"; + import { processNostrIdentifiers } from "$lib/utils/nostrUtils"; import { repostContent } from "$lib/components/embedded_events/EmbeddedSnippets.svelte"; import { repostKinds } from "$lib/consts"; @@ -841,7 +842,7 @@
Comment:
- {#await parseBasicmarkup(message.content.slice(0, 100) + (message.content.length > 100 ? "..." : "")) then parsed} + {#await processNostrIdentifiers(message.content, ndk) then parsed} {@html parsed} {/await} @@ -849,7 +850,7 @@ {:else} - {#await parseBasicmarkup(message.content || "No content") then parsed} + {#await processNostrIdentifiers(message.content || "No content", ndk) then parsed} {@html parsed} {/await} {/if} @@ -951,7 +952,7 @@
Comment:
- {#await parseBasicmarkup(notification.content.slice(0, 100) + (notification.content.length > 100 ? "..." : "")) then parsed} + {#await processNostrIdentifiers(notification.content, ndk) then parsed} {@html parsed} {/await} @@ -959,7 +960,7 @@ {:else} - {#await parseBasicmarkup(notification.content || "No content") then parsed} + {#await processNostrIdentifiers(notification.content || "No content", ndk) then parsed} {@html parsed} {/await} {/if} diff --git a/src/lib/components/embedded_events/EmbeddedSnippets.svelte b/src/lib/components/embedded_events/EmbeddedSnippets.svelte index 48f103d..e23c35f 100644 --- a/src/lib/components/embedded_events/EmbeddedSnippets.svelte +++ b/src/lib/components/embedded_events/EmbeddedSnippets.svelte @@ -275,9 +275,20 @@ {#if quotedMessage} {@const quotedContent = quotedMessage.content ? quotedMessage.content.slice(0, 200) : "No content"} {#await parseEmbeddedMarkup(quotedContent, 0) then parsedContent} - + {/await} {:else} {@const isValidEventId = /^[a-fA-F0-9]{64}$/.test(eventId)} @@ -291,9 +302,20 @@ } })()} {#if nevent} - + {:else}
Quoted message not found. Event ID: {eventId.slice(0, 8)}... diff --git a/src/lib/utils/markup/basicMarkupParser.ts b/src/lib/utils/markup/basicMarkupParser.ts index 02925ec..a7ba2bd 100644 --- a/src/lib/utils/markup/basicMarkupParser.ts +++ b/src/lib/utils/markup/basicMarkupParser.ts @@ -252,7 +252,6 @@ export async function parseBasicmarkup(text: string): Promise { // Process Nostr identifiers last processedText = await processNostrIdentifiersInText(processedText); - processedText = processAllNostrIdentifiers(processedText); // Replace wikilinks processedText = processWikilinks(processedText);