fedimbed: cleaner quote nested quote
This commit is contained in:
parent
18f408ca6b
commit
5514ff2778
1 changed files with 10 additions and 3 deletions
|
@ -1289,11 +1289,18 @@ async function processUrl(msg, url, spoiler = false, command = false, inQuote =
|
|||
let quoteRes;
|
||||
if (platformName == "Nitter") {
|
||||
const quote = content.match(/<blockquote><b>↘ <a href="([^"]+?)">/);
|
||||
if (quote?.[1] && !inQuote) {
|
||||
if (quote?.[1]) {
|
||||
const quoteUrl = quote[1];
|
||||
content = content.replace(/<blockquote><b>↘ <a href="[^"]+?">.+?<\/blockquote>/, "");
|
||||
content = content.replace(
|
||||
/<blockquote><b>↘ <a href="[^"]+?">(.+?)<\/a>.+?<\/blockquote>/,
|
||||
!inQuote
|
||||
? ""
|
||||
: `<small>${Icons.fedimbed.quote
|
||||
.replace("<", "<")
|
||||
.replace(">", ">")} Quoting <a href="${quoteUrl}">$1</a></small>`
|
||||
);
|
||||
|
||||
quoteRes = await processUrl(msg, quoteUrl, spoiler, command, true);
|
||||
if (!inQuote) quoteRes = await processUrl(msg, quoteUrl, spoiler, command, true);
|
||||
}
|
||||
|
||||
content = content
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue