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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Omitting * breaks formatting in VS Code #10

Closed
LinusU opened this issue Jul 29, 2019 · 2 comments
Closed

Omitting * breaks formatting in VS Code #10

LinusU opened this issue Jul 29, 2019 · 2 comments

Comments

@LinusU
Copy link

LinusU commented Jul 29, 2019

  • Don't prefix lines with *.

Opening this since I haven't seen this style used elsewhere, and it's breaking VS Code. Closing this issue with "it's a VS Code issue" is absolutely okay 馃憣

When not prefixing lines with *, all empty lines get's stripped in the @example. It also doesn't highlight the @example block in the source code.

Screenshot 2019-07-29 at 21 13 01

鈽濓笍 With * prefix, notice the @example code being red, and that the popup that shows the function help has line breaks at the correct places.

馃憞 Without * prefix, notice that the @example has the same green color as any other comment, and that the empty lines are stripped in the help popup.

Screenshot 2019-07-29 at 21 13 27

edit: looking at the TSDoc and JSDoc repo/website, I can't find anything that says specifically that you must have them. But I also haven't found a single example that omits them 馃

edit2: It also breaks syntax highlighting when e.g. describing params:

Screenshot 2019-07-29 at 21 34 35

Screenshot 2019-07-29 at 21 34 50

@sindresorhus
Copy link
Owner

VS Code has a lot of quirks when it comes to rendering doc comments. Hopefully one day they will switch to use https://github.com/microsoft/tsdoc (when it's more mature). TSDoc seems to handle missing * just fine: https://microsoft.github.io/tsdoc/ (try it there).

I would recommend opening an issue on VS Code. I have no intention to switch back to using *-prefixed lines.

@LinusU
Copy link
Author

LinusU commented Aug 2, 2019

Will open issue against VS Code 馃憤

@LinusU LinusU closed this as completed Aug 2, 2019
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

2 participants