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

[Bug] JSDoc @link tags not processed at all #4821

Open
1 of 2 tasks
blutorange opened this issue Jan 30, 2025 · 0 comments
Open
1 of 2 tasks

[Bug] JSDoc @link tags not processed at all #4821

blutorange opened this issue Jan 30, 2025 · 0 comments

Comments

@blutorange
Copy link
Contributor

Reproducible in vscode.dev or in VS Code Desktop?

  • Not reproducible in vscode.dev or VS Code Desktop

Reproducible in the monaco editor playground?

Monaco Editor Playground Link

https://microsoft.github.io/monaco-editor/playground.html?source=v0.52.2#XQAAAAJbAQAAAAAAAABBqQkHQ5NjdMjwa-jY7SIQ9S7DNlzs5W-mwj0fe1ZCDRFc9ws9XQE0SJE1jc2VKxhaLFIw9vEWSxW3yscwzW6xRgmSaumWUF-TBOs7lG6C5FSgiqx8uuImdf0W-imPGC1wwOZv8mHqBGB39LygwhEqZ0-8NozpMDQxwOlGv5W-vezUWUVn2DvXhAuUZus6C5mgp9vk_G2lpjCxkaZesFRrlP2tRvxKpHbdLX55ebsmvy7p9s5VX55Q92zEjov_ZNHaYIBeOOvv_rh3hp3KPsGdBYoUl8B0Xgs4fWurw_UT11ll-bH56ARKDzGIszplIj2T6qFyoz6vzU-ULy3BlK5Nb861Uzjb0jsXiTTqS3U8GvNfa8IKvxEZOxE3BF__mfpsAA

Monaco Editor Playground Code

const value = `/**
 * {@link foo}
 * @param {string} x
 */
function foo(x) {
    return 0;
}
`;


// Hover on each property to see its docs!
const myEditor = monaco.editor.create(document.getElementById("container"), {
	value,
	language: "javascript",
	automaticLayout: true,
});

Reproduction Steps

Hover with the mouse over the function foo, so that the overlay with the JSDoc comment appears.

Actual (Problematic) Behavior

The {@link foo} simply gets shown verbatim as plain text, including the braces and the at sign.

Image

Expected Behavior

It only shows the text foo, optionally as a link if it can resolve the reference.

Image

Additional Context

Would be great if the editor could link to symbols in the same file, but it's fine in my opinion if it only shows the text without a link. But when it shows link tags completely unprocessed, JSDocs with more than one link tag quickly become hard to read.

The only somewhat relevant issue I found is #4369.

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

No branches or pull requests

1 participant