chore: fix html references

Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
blam
2022-06-02 14:47:34 +02:00
parent ab425dfea6
commit 7a8dbea0f7
+11 -1
View File
@@ -40,7 +40,7 @@ import {
TSDocTagSyntaxKind,
} from '@microsoft/tsdoc';
import { TSDocConfigFile } from '@microsoft/tsdoc-config';
import { ApiPackage, ApiModel } from '@microsoft/api-extractor-model';
import { ApiPackage, ApiModel, ApiItem } from '@microsoft/api-extractor-model';
import {
IMarkdownDocumenterOptions,
MarkdownDocumenter,
@@ -939,6 +939,16 @@ async function buildDocs({
this._markdownEmitter = new CustomCustomMarkdownEmitter(newModel);
}
private _getFilenameForApiItem(apiItem: ApiItem): string {
const filename: string = super._getFilenameForApiItem(apiItem);
if (filename.endsWith('.html.md')) {
return `${filename.substring(0, filename.length - 8)}._html.md`;
}
return filename;
}
// We don't really get many chances to modify the generated AST
// so we hook in wherever we can. In this case we add the front matter
// just before writing the breadcrumbs at the top.