finalize schema/data setup
Signed-off-by: Folling <mail@folling.io>
This commit is contained in:
parent
4d7bf09c4e
commit
954b8a11a3
89 changed files with 2324 additions and 6271 deletions
|
|
@ -1,68 +0,0 @@
|
|||
// maximum efficiency
|
||||
function enumFormatFix() {
|
||||
Array.from(document.getElementsByClassName("memItemRight")).forEach((elem) => {
|
||||
if (elem.innerHTML.includes("{")) {
|
||||
let str = elem.innerHTML;
|
||||
|
||||
str = str.replaceAll("<br>", "");
|
||||
str = str.replaceAll(" ", "");
|
||||
str = str.replaceAll("{", "{<br> ");
|
||||
str = str.replaceAll("\n,", ",");
|
||||
str = str.replaceAll(",", ",<br> ");
|
||||
str = str.replaceAll("}", "<br>}");
|
||||
|
||||
elem.innerHTML = str
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function paramFormatFix() {
|
||||
Array.from(document.getElementsByClassName("memItemRight")).forEach((elem) => {
|
||||
if (elem.innerHTML.includes("(")) {
|
||||
let str = elem.innerHTML;
|
||||
|
||||
let res = "";
|
||||
let bracket_level = 0;
|
||||
let hit_comma = false;
|
||||
|
||||
for (let c of str) {
|
||||
let new_hit_comma = false;
|
||||
|
||||
if (c === '(') {
|
||||
if (bracket_level === 0) {
|
||||
res += "(<br> ";
|
||||
} else {
|
||||
res += '(';
|
||||
}
|
||||
|
||||
bracket_level++;
|
||||
} else if (c === ')') {
|
||||
if (bracket_level === 1) {
|
||||
res += "<br>)";
|
||||
} else {
|
||||
res += ')';
|
||||
}
|
||||
|
||||
bracket_level--;
|
||||
} else if (c === ',') {
|
||||
if (bracket_level === 1) {
|
||||
res += ",<br> ";
|
||||
} else {
|
||||
res += ',';
|
||||
}
|
||||
|
||||
new_hit_comma = true;
|
||||
} else if (c === ' ' && hit_comma && bracket_level === 1) {
|
||||
new_hit_comma = false;
|
||||
// skip this space
|
||||
} else {
|
||||
res += c;
|
||||
}
|
||||
|
||||
hit_comma = new_hit_comma;
|
||||
}
|
||||
|
||||
elem.innerHTML = res
|
||||
}
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue