fedimbed: guh

This commit is contained in:
Cynthia Foxwell 2025-04-18 21:59:21 -06:00
parent a8a26608b6
commit 1c38406a85
Signed by: Cynosphere
SSH key fingerprint: SHA256:H3SM8ufP/uxqLwKSH7xY89TDnbR9uOHzjLoBr0tlajk

View file

@ -1293,11 +1293,7 @@ async function processUrl(msg, url, spoiler = false, command = false, inQuote =
const quoteUrl = quote[1]; const quoteUrl = quote[1];
content = content.replace( content = content.replace(
/<blockquote><b>↘ <a href="[^"]+?">(.+?)<\/a>.+?<\/blockquote>/, /<blockquote><b>↘ <a href="[^"]+?">(.+?)<\/a>.+?<\/blockquote>/,
!inQuote !inQuote ? "" : `<small>\u2198 Quoting <a href="${quoteUrl}">$1</a></small>`
? ""
: `<small>${Icons.fedimbed.quote
.replace("<", "&lt;")
.replace(">", "&gt;")} Quoting <a href="${quoteUrl}">$1</a></small>`
); );
if (!inQuote) quoteRes = await processUrl(msg, quoteUrl, spoiler, command, true); if (!inQuote) quoteRes = await processUrl(msg, quoteUrl, spoiler, command, true);
@ -1310,6 +1306,10 @@ async function processUrl(msg, url, spoiler = false, command = false, inQuote =
content = htmlToMarkdown(content); content = htmlToMarkdown(content);
if (platformName == "Nitter") {
content = content.replace("\u2198", Icons.fedimbed.quote).replace("\u2198", "\u2139\ufe0f");
}
for (const emote of emotes) { for (const emote of emotes) {
content = content.replaceAll(emote.name, `[${emote.name}](${emote.url})`); content = content.replaceAll(emote.name, `[${emote.name}](${emote.url})`);
} }