Skip to content

Commit

Permalink
Merge pull request ziglang#15950 from der-teufel-programming/autodoc-…
Browse files Browse the repository at this point in the history
…quickfixes

autodoc: Fix rendering of some values in main.js
  • Loading branch information
kristoff-it authored Jun 9, 2023
2 parents 00ff653 + ad6e106 commit 99fe2a2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/docs/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2623,11 +2623,15 @@ const NAV_MODES = {
resolvedValue.expr.call !== undefined ||
resolvedValue.expr.comptimeExpr !== undefined
) {
let typeRef = null;
if (resolvedValue.typeRef !== undefined) {
typeRef = resolvedValue.typeRef;
}
domFnProtoCode.innerHTML =
'<span class="tok-kw">const</span> ' +
escapeHtml(decl.name) +
": " +
exprName(resolvedValue.typeRef !== null ? resolvedValue.typeRef : resolvedValue.expr, { wantHtml: true, wantLink: true }) +
exprName(typeRef !== null ? typeRef : resolvedValue.expr, { wantHtml: true, wantLink: true }) +
" = " +
exprName(decl.value.expr, { wantHtml: true, wantLink: true }) +
";";
Expand Down

0 comments on commit 99fe2a2

Please sign in to comment.