forked from MapComplete/MapComplete
Chore: formatting
This commit is contained in:
parent
45f3aadef3
commit
badfbb60e4
120 changed files with 3330 additions and 1759 deletions
|
|
@ -29,7 +29,15 @@ export default class Table extends BaseUIElement {
|
|||
const header = Utils.NoNull(headerMarkdownParts).join(" | ")
|
||||
const headerSep = headerMarkdownParts.map((part) => "-".repeat(part.length + 2)).join(" | ")
|
||||
const table = this._contents
|
||||
.map((row) => row.map((el) => el?.AsMarkdown()?.replaceAll("\\","\\\\")?.replaceAll("|", "\\|") ?? " ").join(" | "))
|
||||
.map((row) =>
|
||||
row
|
||||
.map(
|
||||
(el) =>
|
||||
el?.AsMarkdown()?.replaceAll("\\", "\\\\")?.replaceAll("|", "\\|") ??
|
||||
" "
|
||||
)
|
||||
.join(" | ")
|
||||
)
|
||||
.join("\n")
|
||||
|
||||
return "\n\n" + [header, headerSep, table, ""].join("\n")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue