renderJsDoc joined every output fragment with a blank line, including the individual rows of the parameter table it builds from @param tags. Markdown requires table rows on consecutive lines, so every parameter table on the API pages rendered as literal pipe-delimited paragraphs. Build the table as a single block before joining sections.
- commit
- f9b9339fbe8f8e2dce58f70e9b3ff19564f25219
- parent
- bb643da35cf2bff48319b2c3589e530d99b4cdbf
- author
- FelineStateMachine <dami.etoile@gmail.com>
| M | tools/ | 15 | ++++++++------- |
@@ -368,13 +368,14 @@ function renderJsDoc(jsDoc: JsDoc | undefined): string {
368368 const tags = jsDoc.tags ?? [];369369 const params = tags.filter((tag) => tag.kind === "param" && tag.doc);370370 if (params.length > 0) {371- out.push("| Parameter | Description |");372- out.push("| --- | --- |");373- for (const tag of params) {374- out.push(375- `| \`${tag.name}\` | ${renderJsDocText(tag.doc ?? "").replaceAll("\n", " ")} |`,376- );377- }371+ const rows = [372+ "| Parameter | Description |",373+ "| --- | --- |",374+ ...params.map((tag) =>375+ `| \`${tag.name}\` | ${renderJsDocText(tag.doc ?? "").replaceAll("\n", " ")} |`376+ ),377+ ];378+ out.push(rows.join("\n"));378379 }379380 for (const tag of tags) {380381 if (tag.kind === "return" && tag.doc) {