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

JSDoc code fence displays invalid decorator code #39728

Closed
TheColorRed opened this issue Jul 24, 2020 · 3 comments
Closed

JSDoc code fence displays invalid decorator code #39728

TheColorRed opened this issue Jul 24, 2020 · 3 comments
Labels
Won't Fix The severity and priority of this issue do not warrant the time or complexity needed to fix it

Comments

@TheColorRed
Copy link

Code

/**
 * ```
 * @NgModule({
 *   providers: [ ]
 * })
 * export class AppModule { }
 * ```
 *
 * @export
 * @class OAuthInitService
 */
export class MyClass {}

Expected behavior:

When you mouse over the element you should see properly formatted code when a decorator is used within a jsdoc code fence.

Actual behavior:

When you mouse over the element to see the jsdoc the code fence block displays incorrectly when using decorators:

image

If you prefix the @NgModule with a \ so it becomes \@NgModule. Then the code displays properly, however the \ is still present:

image

@RyanCavanaugh RyanCavanaugh added the Won't Fix The severity and priority of this issue do not warrant the time or complexity needed to fix it label Jul 24, 2020
@RyanCavanaugh
Copy link
Member

You have a markdown code fence in a JS Doc comment block; we do not intermix these DSLs for the purpose of comment parsing.

You can see that the JS Doc "examples" do not use code fences: https://jsdoc.app/tags-example.html

@TheColorRed
Copy link
Author

@RyanCavanaugh Then shouldn't/couldn't the example code be formatted?

@trusktr
Copy link
Contributor

trusktr commented Oct 1, 2022

@TheColorRed Kinda harsh that your issue got closed without a workaround, or without even acknowledging that a solution exists.

I've always been unable to decorate inside JSDoc examples. Looks like there is finally an issue that they are (respectfully) keeping open:

#47679

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Won't Fix The severity and priority of this issue do not warrant the time or complexity needed to fix it
Projects
None yet
Development

No branches or pull requests

3 participants