-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Jsdoc https @link text not parsed properly #46734
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
Comments
Moving the |
For: /**
{@link http://www.google.com}
*/
function myFunction() {} The returned "documentation": [
{
"text": "",
"kind": "text"
},
{
"text": "{@link ",
"kind": "link"
},
{
"text": "http ://www.google.com",
"kind": "linkText"
},
{
"text": "}",
"kind": "link"
}
], |
VSCode uses the TypeScript language service for IntelliSense in both JavaScript and TypeScript. This includes JSDoc parsing, which TS implements because it can optionally use it for type checking with |
There's another issue regarding the display text for While removing the vertical bar does make it display the correct text in the tooltip, this goes against the above documentation, their example code and even the official tsdoc library, as the latter will output a It's worth mentioning that JSDoc does allow omitting the vertical bar, but it also supports having the vertical bar. Their examples showcase that if a vertical bar is used, it isn't displayed, similar to how TSDoc handles the vertical bar. Tested using TypeScript versions 4.4.4 and 4.5.4 |
@SchoofsKelvin can you open a separate bug for that? It's worth fixing, but from my perspective it's a separate feature than correctly keeping |
Also improve .d.ts formatting of `@link`,`@linkcode`,`@linkplain`. Fixes #46734 1. Previously, `@link` incorrectly put a space between "https" and "://" when formatting jsdoc for editors. Now it does not. 2. When fixing the same output for .d.ts, I discovered that all `@link` tags were formatted as `@link`, even if they were `@linkcode` or `@linkplain`. I fixed that too.
* Fix @link https:// formatting Also improve .d.ts formatting of `@link`,`@linkcode`,`@linkplain`. Fixes #46734 1. Previously, `@link` incorrectly put a space between "https" and "://" when formatting jsdoc for editors. Now it does not. 2. When fixing the same output for .d.ts, I discovered that all `@link` tags were formatted as `@link`, even if they were `@linkcode` or `@linkplain`. I fixed that too. * semicolon lint
TS Template added by @mjbvz
TypeScript Version: 4.6.0-dev.20211108
Search Terms
Does this issue occur when all extensions are disabled?: Yes
After searching the issues, I have found relevant ones :
They are closed since
v1.58.0
with this commit microsoft/vscode@7339e94. I don't know if they are related or not.Using VSCode
v1.62
shipped with TypeScriptv4.4.3
, the url gets splitted afterhttps?
.Using TypeScript
v4.2.4
only URLs work, not symbols.Using TypeScript
v4.3.5
, everything works fine.I do not understand why the JSDoc implementation on VSCode is dependent of TypeScript version even in pure JS files. I apologize if TypeScript version older than
v4.3
are not supported, and I think they are not by reading the issues about implementing@link
.There is still an issue with the latest version.
I currently do not have the time to investigate more, sorry for that. Thanks for reading me!
Here is the sample of code I used :
VSCode About section :
The text was updated successfully, but these errors were encountered: