diff --git a/src/utils/note.test.ts b/src/utils/note.test.ts
index 58c39359..da922741 100644
--- a/src/utils/note.test.ts
+++ b/src/utils/note.test.ts
@@ -11,10 +11,15 @@ Deno.test('parseNoteContent', () => {
});
Deno.test('parseNoteContent parses URLs', () => {
- const { html } = parseNoteContent(`check out my website: https://alexgleason.me`, []);
+ const { html } = parseNoteContent('check out my website: https://alexgleason.me', []);
assertEquals(html, 'check out my website: https://alexgleason.me');
});
+Deno.test('parseNoteContent parses bare URLs', () => {
+ const { html } = parseNoteContent('have you seen ditto.pub?', []);
+ assertEquals(html, 'have you seen ditto.pub?');
+});
+
Deno.test('parseNoteContent parses mentions with apostrophes', () => {
const { html } = parseNoteContent(
`did you see nostr:nprofile1qqsqgc0uhmxycvm5gwvn944c7yfxnnxm0nyh8tt62zhrvtd3xkj8fhgprdmhxue69uhkwmr9v9ek7mnpw3hhytnyv4mz7un9d3shjqgcwaehxw309ahx7umywf5hvefwv9c8qtmjv4kxz7gpzemhxue69uhhyetvv9ujumt0wd68ytnsw43z7s3al0v's speech?`,
diff --git a/src/utils/note.ts b/src/utils/note.ts
index b0b075d9..d64f3dcd 100644
--- a/src/utils/note.ts
+++ b/src/utils/note.ts
@@ -52,8 +52,8 @@ function parseNoteContent(content: string, mentions: MastodonMention[]): ParsedN
return html`@${name}${extra}`;
}
}
+ return content;
}
- return content;
} catch {
// fallthrough
}