forked from MapComplete/MapComplete
Better table export as MD, regenerate of the documentation
This commit is contained in:
parent
5f82bf78e8
commit
b9b504aebc
3 changed files with 403 additions and 6 deletions
|
@ -21,10 +21,10 @@ export default class Table extends BaseUIElement {
|
|||
|
||||
const headerMarkdownParts = this._header.map(hel => hel?.AsMarkdown() ?? " ")
|
||||
const header = headerMarkdownParts.join(" | ");
|
||||
const headerSep = headerMarkdownParts.map(part => '-'.repeat(part.length + 2)).join("|")
|
||||
const table = this._contents.map(row => row.map(el => el.AsMarkdown() ?? " ").join("|")).join("\n")
|
||||
const headerSep = headerMarkdownParts.map(part => '-'.repeat(part.length + 2)).join(" | ")
|
||||
const table = this._contents.map(row => row.map(el => el.AsMarkdown() ?? " ").join(" | ")).join("\n")
|
||||
|
||||
return [header, headerSep, table, ""].join("\n")
|
||||
return "\n\n" + [header, headerSep, table, ""].join("\n")
|
||||
}
|
||||
|
||||
protected InnerConstructElement(): HTMLElement {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue