This commit is contained in:
MathMan05 2024-11-18 11:42:30 -06:00
parent 64672f4568
commit 17d032b9ea

View file

@ -130,6 +130,17 @@ class MarkDown{
i++; i++;
} }
} }
if(txt[i] === "\\"){
const chatset=new Set("\\`{}[]()<>*_#+-.!|".split(""));
if(chatset.has(txt[i+1])){
if(keep){
current.textContent += txt[i];
}
current.textContent += txt[i+1];
i++;
continue;
}
}
if(txt[i] === "\n"){ if(txt[i] === "\n"){
if(!stdsize){ if(!stdsize){
appendcurrent(); appendcurrent();
@ -152,13 +163,7 @@ class MarkDown{
let find = 0; let find = 0;
let j = i + count; let j = i + count;
let init = true; let init = true;
for( for(;txt[j] !== undefined &&(txt[j] !== "\n" || count === 3) &&find !== count;j++){
;
txt[j] !== undefined &&
(txt[j] !== "\n" || count === 3) &&
find !== count;
j++
){
if(txt[j] === "`"){ if(txt[j] === "`"){
find++; find++;
}else{ }else{
@ -540,29 +545,29 @@ txt[j + 1] === undefined)
}); });
else if(!parts[3] || parts[3] === "f") else if(!parts[3] || parts[3] === "f")
time = time =
dateInput.toLocaleString(void 0, { dateInput.toLocaleString(void 0, {
day: "numeric", day: "numeric",
month: "long", month: "long",
year: "numeric", year: "numeric",
}) + }) +
" " + " " +
dateInput.toLocaleString(void 0, { dateInput.toLocaleString(void 0, {
hour: "2-digit", hour: "2-digit",
minute: "2-digit", minute: "2-digit",
}); });
else if(parts[3] === "F") else if(parts[3] === "F")
time = time =
dateInput.toLocaleString(void 0, { dateInput.toLocaleString(void 0, {
day: "numeric", day: "numeric",
month: "long", month: "long",
year: "numeric", year: "numeric",
weekday: "long", weekday: "long",
}) + }) +
" " + " " +
dateInput.toLocaleString(void 0, { dateInput.toLocaleString(void 0, {
hour: "2-digit", hour: "2-digit",
minute: "2-digit", minute: "2-digit",
}); });
else if(parts[3] === "t") else if(parts[3] === "t")
time = dateInput.toLocaleString(void 0, { time = dateInput.toLocaleString(void 0, {
hour: "2-digit", hour: "2-digit",
@ -575,10 +580,7 @@ txt[j + 1] === undefined)
second: "2-digit", second: "2-digit",
}); });
else if(parts[3] === "R") else if(parts[3] === "R")
time = time =Math.round((Date.now() - Number.parseInt(parts[1]) * 1000) / 1000 / 60) + " minutes ago";
Math.round(
(Date.now() - Number.parseInt(parts[1]) * 1000) / 1000 / 60
) + " minutes ago";
} }
const timeElem = document.createElement("span"); const timeElem = document.createElement("span");
@ -589,10 +591,7 @@ txt[j + 1] === undefined)
} }
} }
if( if(txt[i] === "<" && (txt[i + 1] === ":" || (txt[i + 1] === "a" && txt[i + 2] === ":")&&this.owner)){
txt[i] === "<" &&
(txt[i + 1] === ":" || (txt[i + 1] === "a" && txt[i + 2] === ":")&&this.owner)
){
let found = false; let found = false;
const build = txt[i + 1] === "a" ? ["<", "a", ":"] : ["<", ":"]; const build = txt[i + 1] === "a" ? ["<", "a", ":"] : ["<", ":"];
let j = i + build.length; let j = i + build.length;