Skip to content

Commit 2c92b1d

Browse files
committed
Update to use new tsdoc API
1 parent e044867 commit 2c92b1d

1 file changed

Lines changed: 14 additions & 6 deletions

File tree

‎apps/api-extractor/src/aedoc/ApiDocumentation.ts‎

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
DocBlockTag,
1414
StandardTags,
1515
StandardModifierTagSet,
16+
DocBlock,
1617
DocComment,
1718
DocSection,
1819
DocNodeKind,
@@ -359,8 +360,11 @@ export class ApiDocumentation {
359360
allowStructuredContent: boolean): void {
360361
switch (node.kind) {
361362
case DocNodeKind.Block:
362-
case DocNodeKind.Section:
363363
case DocNodeKind.ParamBlock:
364+
const docBlock: DocBlock = node as DocBlock;
365+
this._renderAsMarkupElementsInto(result, docBlock.content, sectionName, allowStructuredContent);
366+
break;
367+
case DocNodeKind.Section:
364368
const docSection: DocSection = node as DocSection;
365369
for (const childNode of docSection.nodes) {
366370
this._renderAsMarkupElementsInto(result, childNode, sectionName, allowStructuredContent);
@@ -379,7 +383,7 @@ export class ApiDocumentation {
379383
break;
380384
case DocNodeKind.EscapedText:
381385
const docEscapedText: DocEscapedText = node as DocEscapedText;
382-
Markup.appendTextElements(result, docEscapedText.text);
386+
Markup.appendTextElements(result, docEscapedText.decodedText);
383387
break;
384388
case DocNodeKind.FencedCode:
385389
if (allowStructuredContent) {
@@ -402,9 +406,9 @@ export class ApiDocumentation {
402406
case DocNodeKind.HtmlStartTag:
403407
const docHtmlStartTag: DocHtmlStartTag = node as DocHtmlStartTag;
404408
let htmlStartTag: string = '<';
405-
htmlStartTag += docHtmlStartTag.elementName;
409+
htmlStartTag += docHtmlStartTag.name;
406410
for (const attribute of docHtmlStartTag.htmlAttributes) {
407-
htmlStartTag += ` ${attribute.attributeName}=${attribute.attributeValue}`;
411+
htmlStartTag += ` ${attribute.name}=${attribute.value}`;
408412
}
409413
if (docHtmlStartTag.selfClosingTag) {
410414
htmlStartTag += '/';
@@ -414,7 +418,7 @@ export class ApiDocumentation {
414418
break;
415419
case DocNodeKind.HtmlEndTag:
416420
const docHtmlEndTag: DocHtmlEndTag = node as DocHtmlEndTag;
417-
result.push(Markup.createHtmlTag(`</${docHtmlEndTag.elementName}>`));
421+
result.push(Markup.createHtmlTag(`</${docHtmlEndTag.name}>`));
418422
break;
419423
case DocNodeKind.InlineTag:
420424
const docInlineTag: DocInlineTag = node as DocInlineTag;
@@ -628,8 +632,12 @@ export class ApiDocumentation {
628632
// If no resolvedAstItem found then nothing to inherit
629633
// But for the time being set the summary to a text object
630634
if (!resolvedAstItem) {
635+
let unresolvedAstItemName: string = apiDefinitionRef.exportName;
636+
if (apiDefinitionRef.memberName) {
637+
unresolvedAstItemName += '.' + apiDefinitionRef.memberName;
638+
}
631639
this.summary.push(...Markup.createTextElements(
632-
`See documentation for ${this._docComment.inheritDocTag.tagContent}`));
640+
`See documentation for ${unresolvedAstItemName}`));
633641
return;
634642
}
635643

0 commit comments

Comments
 (0)