add \
This commit is contained in:
parent
64672f4568
commit
17d032b9ea
1 changed files with 35 additions and 36 deletions
|
@ -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{
|
||||||
|
@ -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;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue