Skip to content

Commit

Permalink
doc-fix(wiki-dfg): fix indent code font (#1273)
Browse files Browse the repository at this point in the history
  • Loading branch information
EagleoutIce authored Feb 3, 2025
1 parent d6ff156 commit 3e5251e
Show file tree
Hide file tree
Showing 2 changed files with 94 additions and 94 deletions.
6 changes: 3 additions & 3 deletions src/documentation/doc-util/doc-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -365,9 +365,9 @@ export function implSnippet(node: TypeElementInSource | undefined, program: ts.P

let text = node.comments?.join('\n') ?? '';
const code = node.node.getFullText(program.getSourceFile(node.node.getSourceFile().fileName));
text += `\n<details><summary style="color:gray">Defined at <a href="${getTypePathLink(node)}">${getTypePathLink(node, '.')}</a></summary>\n\n${codeBlock('ts', code)}\n\n</details>\n`;
const init = showName ? ` * ${bold}[${node.name}](${getTypePathLink(node)})${bold} ${sep}${indent}` : '';
return ` ${indent} ${showName ? init : ''} ${text.replaceAll('\t',' ').split(/\n/g).join(`\n${indent} `)}`;
text += `\n${indent}<details><summary style="color:gray">Defined at <a href="${getTypePathLink(node)}">${getTypePathLink(node, '.')}</a></summary>\n\n${codeBlock('ts', code)}\n\n</details>\n`;
const init = showName ? `* ${bold}[${node.name}](${getTypePathLink(node)})${bold} ${sep}${indent}` : '';
return ` ${indent}${showName ? init : ''} ${text.replaceAll('\t',' ').split(/\n/g).join(`\n${indent} `)}`;
}

export interface PrintHierarchyArguments {
Expand Down
Loading

0 comments on commit 3e5251e

Please sign in to comment.