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

[HTML] @link and @linkcode tags are not processed correctly on all symbols page #594

Closed
nberlette opened this issue May 28, 2024 · 1 comment · Fixed by #641
Closed

[HTML] @link and @linkcode tags are not processed correctly on all symbols page #594

nberlette opened this issue May 28, 2024 · 1 comment · Fixed by #641

Comments

@nberlette
Copy link

Deno Version

$ deno --version

deno 1.43.6+53606de (canary, x86_64-apple-darwin)
v8 12.6.228.3
typescript 5.4.5

Expected Behavior

The @linkcode and @link tags in symbol descriptions should generate a link with and without a <code> tag around the specified text, respectively.

This provides clear and navigable links within the documentation. Since the individual symbol pages handle these JSDoc tags as expected, I would also expect for the "all symbols" page to do the same.

Actual Behavior

The @link and @linkcode tags are not handled correctly on the "all symbols" pages, and end up rendered without any hyperlink at all, and two instances of the linked symbol name.

For example, {@link TrimLeft} renders as TrimLeft | TrimLeft, and {@linkcode TrimLeft} renders as <code>TrimLeft</code> | TrimLeft (with no links in either).

All Symbols

image

Individual Symbol

image

Documented Code

This is the code that the documentation was generated from in the above screenshots:

/**
 * See {@link TrimLeft} for the type equivalent. See {@linkcode TrimLeft}
 * for the type equivalent.
 */
export function trimLeft(value: string): string {
  return value.replace(/^\s+/, "");
}

/**
 * See {@link trimLeft} for the runtime equivalent. See {@linkcode trimLeft} 
 * for the runtime equivalent.
 */
export type TrimLeft = (value: string) => string;

Thanks for your time.

@crowlKats
Copy link
Member

We have a patch that already landed (#580) that fixes the high-level issue that its rendered double. however linking itself is a separate issue thats trickier, and has a todo:

// TODO(@crowlKats): handle doc_nodes in all symbols page for each symbol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants