Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

defaultValue rendering defaults to code block #2601

Closed
erickzhao opened this issue Jun 21, 2024 · 1 comment
Closed

defaultValue rendering defaults to code block #2601

erickzhao opened this issue Jun 21, 2024 · 1 comment
Labels
bug Functionality does not match expectation
Milestone

Comments

@erickzhao
Copy link

erickzhao commented Jun 21, 2024

Search terms

defaultValue, default, code, formatting, tsdoc, tag

Expected Behavior

When setting a @defaultValue block tag, I expect to be able to link to external sources and use inline tags such as @link.

This is the behavior I get when using VSCode Intellisense as well.

Actual Behavior

When setting a @defaultValue block tag, the entire content of @defaultValue gets formatted as a code block. This prevents inline tags from rendering properly.

I can work around this by adding a piece of inline code within the description, which seems to disable the code block around the entire description.

Steps to reproduce the bug

export interface Test {
  /**
   * An optional filesystem path input that is set internally if not specified by the user.
   *
   * @defaultValue Node.js {@link https://nodejs.org/api/process.html#processexecpath| `process.execPath`} value
   */
  path?: string;

  /**
   * An optional filesystem path input that is set internally if not specified by the user.
   *
   * @defaultValue Node.js {@link https://nodejs.org/api/process.html#processexecpath| `process.execPath`} value `beep boop`
   */
  path2?: string;
}

Minimal repro:

Environment

  • Typedoc version: 0.25.13
  • TypeScript version: 5.4.5
  • Node.js version: v20.11.0
  • OS: macOS 14.5 (Sonoma)
@erickzhao erickzhao added the bug Functionality does not match expectation label Jun 21, 2024
Gerrit0 added a commit to TypeStrong/typedoc-site that referenced this issue Jun 21, 2024
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Jun 21, 2024

Huh, VSCode updated their criteria... that used to be rendered as code if the block didn't contain a code block, matching TypeDoc's implementation. Easy fix, and I like this way better...

@Gerrit0 Gerrit0 added this to the v0.26.0 milestone Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Functionality does not match expectation
Projects
None yet
Development

No branches or pull requests

2 participants