Better table export as MD, regenerate of the documentation

This commit is contained in:
Pieter Vander Vennet 2021-06-21 03:37:00 +02:00
parent 5f82bf78e8
commit b9b504aebc
3 changed files with 403 additions and 6 deletions

View file

@ -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 {