Skip to content

@link syntax eats hyphen #48392

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

Closed
jrieken opened this issue Mar 23, 2022 · 5 comments · Fixed by #48416
Closed

@link syntax eats hyphen #48392

jrieken opened this issue Mar 23, 2022 · 5 comments · Fixed by #48416
Assignees
Labels
Bug A bug in TypeScript Domain: JSDoc Relates to JSDoc parsing and type generation Effort: Moderate Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual". Fix Available A PR has been opened for this issue Help Wanted You can do this

Comments

@jrieken
Copy link
Member

jrieken commented Mar 23, 2022

TS Template added by @mjbvz

TypeScript Version: 4.7.0-dev.20220323

Search Terms

  • jsdoc
  • quickinfo

Screenshot 2022-03-23 at 12 42 02

@mjbvz
Copy link
Contributor

mjbvz commented Mar 23, 2022

Looks like a recent regression. Works for me with TS 4.6.2 but not with the latest TS 4.7 nightly

@mjbvz mjbvz transferred this issue from microsoft/vscode Mar 23, 2022
@mjbvz mjbvz removed their assignment Mar 23, 2022
@mjbvz
Copy link
Contributor

mjbvz commented Mar 23, 2022

Self contained example:

/**
 * {@link bar}-thing
 */
function bar() {}

@a-tarasyuk
Copy link
Contributor

a-tarasyuk commented Mar 24, 2022

Omitting - separator was introduced in #44956. {@link bar}-thing parsed as [JSDocText, JSDocLink, JSDocText], the last comment contains text -thing which stars with - separator. Maybe this should be applied only to the @ param tag or completely reverted.

@DanielRosenwasser DanielRosenwasser added Bug A bug in TypeScript Domain: JSDoc Relates to JSDoc parsing and type generation labels Mar 24, 2022
@DanielRosenwasser DanielRosenwasser added Help Wanted You can do this Effort: Moderate Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual". labels Mar 24, 2022
@DanielRosenwasser DanielRosenwasser added this to the TypeScript 4.7.0 milestone Mar 24, 2022
@DanielRosenwasser
Copy link
Member

I think scoping it to just the @param tag is reasonable, but I'm open to suggestions/thoughts from others

@sandersn
Copy link
Member

My personal preference would be to revert entirely, but you could also argue that @param {type} name - description is a common pattern, and only remove the dash right after the parameter name of a @param tag.

I personally like to see the dash in that case, but the person who filed the original bug did not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Domain: JSDoc Relates to JSDoc parsing and type generation Effort: Moderate Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual". Fix Available A PR has been opened for this issue Help Wanted You can do this
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants