autodoc: Add hidden class to [src] link when starting renderApi to only show it for functions (#17322)

This commit is contained in:
Krzysztof Wolicki 2023-10-04 18:42:49 +02:00 committed by GitHub
parent 9c3165b81b
commit 4d1e8ef1eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -750,6 +750,7 @@ Happy writing!
domSectFnErrors.classList.add("hidden");
domFnExamples.classList.add("hidden");
domFnNoExamples.classList.add("hidden");
domFnSourceLink.classList.add("hidden");
domDeclNoRef.classList.add("hidden");
domFnErrorsAnyError.classList.add("hidden");
domTableFnErrors.classList.add("hidden");
@ -904,7 +905,7 @@ Happy writing!
let typeObj = getType(value.expr.type);
domFnProtoCode.innerHTML = renderTokens(ex(value.expr, { fnDecl: fnDecl }));
domFnSourceLink.classList.remove("hidden");
domFnSourceLink.innerHTML = "[<a target=\"_blank\" href=\"" + sourceFileLink(fnDecl) + "\">src</a>]";
let docsSource = null;