mirror of
https://github.com/microsoft/playwright.git
synced 2024-11-24 06:49:04 +03:00
chore: fix docs roll (#19605)
This commit is contained in:
parent
3555dbd4b4
commit
51782cfa5d
@ -170,18 +170,19 @@ class Documentation {
|
||||
this._patchLinksInText = (classOrMember, text) => patchLinksInText(classOrMember, text, classesMap, membersMap, linkRenderer);
|
||||
|
||||
for (const clazz of this.classesArray)
|
||||
clazz.visit(item => this.renderLinksInNodes(item));
|
||||
clazz.visit(item => item.spec && this.renderLinksInNodes(item.spec, item));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {MarkdownNode[]} nodes
|
||||
* @param {Class|Member=} classOrMember
|
||||
*/
|
||||
renderLinksInNodes(classOrMember) {
|
||||
if (!classOrMember?.spec)
|
||||
return;
|
||||
classOrMember.discouraged = this.renderLinksInText(classOrMember.discouraged || '', classOrMember);
|
||||
classOrMember.deprecated = this.renderLinksInText(classOrMember.deprecated || '', classOrMember);
|
||||
md.visitAll(classOrMember.spec, node => {
|
||||
renderLinksInNodes(nodes, classOrMember) {
|
||||
if (classOrMember instanceof Member) {
|
||||
classOrMember.discouraged = classOrMember.discouraged ? this.renderLinksInText(classOrMember.discouraged, classOrMember) : undefined;
|
||||
classOrMember.deprecated = classOrMember.deprecated ? this.renderLinksInText(classOrMember.deprecated, classOrMember) : undefined
|
||||
}
|
||||
md.visitAll(nodes, node => {
|
||||
if (!node.text)
|
||||
return;
|
||||
node.text = this.renderLinksInText(node.text, classOrMember);
|
||||
|
Loading…
Reference in New Issue
Block a user