Chore: formatting

This commit is contained in:
Pieter Vander Vennet 2024-06-16 16:06:26 +02:00
parent 35eff07c80
commit c08fe03ed0
422 changed files with 31594 additions and 43019 deletions

View file

@ -1,22 +1,20 @@
export default class MarkdownUtils {
public static table(header: string[], contents: string[][]){
public static table(header: string[], contents: string[][]) {
let result = ""
result += "\n\n| "+header.join(" | ") + " |\n"
result += "\n\n| " + header.join(" | ") + " |\n"
result += header.map(() => "-----").join("|") + " |\n"
for (const line of contents) {
if(!line){
if (!line) {
continue
}
result += "| " + line.map(x => x ?? "").join(" | ") + " |\n"
result += "| " + line.map((x) => x ?? "").join(" | ") + " |\n"
}
result += "\n\n"
return result
}
static list(strings: string[]): string {
return strings.map(item => " - "+item).join("\n")
return strings.map((item) => " - " + item).join("\n")
}
}