From e19e0df8f97d6e487df6fdd672924b9584d0a0d7 Mon Sep 17 00:00:00 2001 From: 7w1 Date: Thu, 14 May 2026 23:48:10 -0500 Subject: [PATCH] formatting --- src/app/features/room/message/hiddenLinkPreviews.ts | 3 +-- src/app/plugins/markdown/htmlToMarkdown.test.ts | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/app/features/room/message/hiddenLinkPreviews.ts b/src/app/features/room/message/hiddenLinkPreviews.ts index 1d0ca26c5..7c8ed7e54 100644 --- a/src/app/features/room/message/hiddenLinkPreviews.ts +++ b/src/app/features/room/message/hiddenLinkPreviews.ts @@ -28,8 +28,7 @@ export function stripMarkdownEscapesForHiddenPreviews(markdown: string): string s = s.replace(ESCAPED_SUPPRESSED_MD_LINK, '[$1]($2)'); // Same for "\<[label](bare-url)>" when angle brackets were lost on the destination. - const WRONG_OUTER_ESCAPED_AUTOLINK = - /\\<\[([^\]]+)\]\((https?:\/\/[^)\s]+)\)(?:>|\\>)/g; + const WRONG_OUTER_ESCAPED_AUTOLINK = /\\<\[([^\]]+)\]\((https?:\/\/[^)\s]+)\)(?:>|\\>)/g; s = s.replace(WRONG_OUTER_ESCAPED_AUTOLINK, '[$1](<$2>)'); return s; diff --git a/src/app/plugins/markdown/htmlToMarkdown.test.ts b/src/app/plugins/markdown/htmlToMarkdown.test.ts index 238fdbacb..8ca43b6ad 100644 --- a/src/app/plugins/markdown/htmlToMarkdown.test.ts +++ b/src/app/plugins/markdown/htmlToMarkdown.test.ts @@ -68,8 +68,7 @@ describe('htmlToMarkdown', () => { }); it('converts hidden-preview wrapped links when angle brackets are decimal entities', () => { - const html = - '

<https://example.org/>

'; + const html = '

<https://example.org/>

'; expect(htmlToMarkdown(html)).toBe('[https://example.org/]()'); });