docs: show experimental and remark blocks (#12363)

This commit is contained in:
Nikolay Vitkov
2024-04-29 14:50:39 +02:00
committed by GitHub
parent fb0d7252e4
commit 41d43200b7
30 changed files with 795 additions and 6 deletions

View File

@@ -1268,6 +1268,19 @@ export class MarkdownDocumenter {
}
}
if (apiItem instanceof ApiDocumentedItem) {
const isExperimental =
apiItem.tsdocComment?.modifierTagSet.isExperimental();
if (isExperimental) {
section.appendNodesInParagraph([
new DocEmphasisSpan({configuration, bold: true, italic: true}, [
new DocPlainText({configuration, text: '(Experimental)'}),
]),
new DocPlainText({configuration, text: ' '}),
]);
}
}
if (apiItem instanceof ApiDocumentedItem) {
if (apiItem.tsdocComment !== undefined) {
this._appendAndMergeSection(
@@ -1291,6 +1304,21 @@ export class MarkdownDocumenter {
}
}
if (apiItem instanceof ApiDocumentedItem) {
const remarks = apiItem.tsdocComment?.remarksBlock;
if (remarks) {
section.appendNode(
new DocParagraph({configuration}, [
new DocEmphasisSpan({configuration, bold: true}, [
new DocPlainText({configuration, text: 'Remarks: '}),
]),
])
);
section.appendNodes(remarks.content.getChildNodes());
}
}
return new DocTableCell({configuration}, section.nodes);
}