mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
docs: show experimental and remark blocks (#12363)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user