fedimbed: more markdown fixery
This commit is contained in:
parent
404253f0c8
commit
31d61af27e
1 changed files with 3 additions and 3 deletions
|
@ -1304,9 +1304,9 @@ async function processUrl(msg, url, spoiler = false, command = false, inQuote =
|
||||||
.replaceAll(/twitter\.com\/t\.co/g, "t.co");
|
.replaceAll(/twitter\.com\/t\.co/g, "t.co");
|
||||||
}
|
}
|
||||||
|
|
||||||
content = content.replace(/`/g, "\u02cb");
|
content = content.replaceAll("`", "\u02cb").replaceAll("*", "\u2217");
|
||||||
|
|
||||||
content = htmlToMarkdown(content);
|
content = htmlToMarkdown(content);
|
||||||
|
content = content.replaceAll("||", "|\u200b|");
|
||||||
|
|
||||||
if (platformName == "Nitter") {
|
if (platformName == "Nitter") {
|
||||||
content = content.replace("\u2198", Icons.fedimbed.quote).replace("> **\u24d8", "> **\u2139\ufe0f");
|
content = content.replace("\u2198", Icons.fedimbed.quote).replace("> **\u24d8", "> **\u2139\ufe0f");
|
||||||
|
@ -1322,7 +1322,7 @@ async function processUrl(msg, url, spoiler = false, command = false, inQuote =
|
||||||
let MAX_LENGTH = 3999;
|
let MAX_LENGTH = 3999;
|
||||||
if (cw != "" || sensitive) {
|
if (cw != "" || sensitive) {
|
||||||
const ors = content.split("||");
|
const ors = content.split("||");
|
||||||
desc += `||${content.replaceAll("||", "|\u200b|")}||`;
|
desc += `||${content}||`;
|
||||||
MAX_LENGTH -= ors.length - 1;
|
MAX_LENGTH -= ors.length - 1;
|
||||||
MAX_LENGTH -= 4;
|
MAX_LENGTH -= 4;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue