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

Line breaks in JSDocs/Markdown comments render inconsistent space in Intellisense boxes. #11032

Closed
craxal opened this issue Aug 26, 2016 · 6 comments
Assignees

Comments

@craxal
Copy link

craxal commented Aug 26, 2016

  • VSCode Version: 1.4.0
  • OS Version: Windows 10

If I have a JSDocs header like this:

/**
 * @summary Does something.
 * @description This is a long description. In code, this description can get pretty long,
 * so I will break it up into multiple lines for easier reading.
 * - Example bullet
 * - Example bullet
 *
 * @returns A value.
 * 
 */

VS Code's Intellisense box renders it like this:

@summary Does something.
@description This is a long description. In code, this description can get
pretty long,
so I will break it up into multiple lines for easier reading.

  • Example bullet
  • Example bullet

@returns A value.
function ...

When I'm expecting something more like this:

Does something.

This is a long description. In code, this description can get
pretty long, so I will break it up into multiple lines for
easier reading.

  • Example bullet
  • Example bullet

@returns A value.

function ...

@craxal craxal changed the title Line breaks in JSDocs/Markdown comments create too much space. Line breaks in JSDocs/Markdown comments create inconsistent space. Aug 26, 2016
@craxal craxal changed the title Line breaks in JSDocs/Markdown comments create inconsistent space. Line breaks in JSDocs/Markdown comments render inconsistent space in Intellisense boxes. Aug 26, 2016
@jrieken jrieken assigned joaomoreno and unassigned jrieken Aug 29, 2016
@joaomoreno
Copy link
Member

@jrieken Isn't this up to each language to implement? Understanding @summary and @description?

@jrieken
Copy link
Member

jrieken commented Aug 29, 2016

I believe this is about spacing in LI-tags

@joaomoreno
Copy link
Member

joaomoreno commented Aug 29, 2016

I don't think so.

@craxal If the list item spacing bothers you, #11101 is the issue to follow. If, on the other hand, you want the language server to understand @summary and @description in docs, vscode-typescript is where you should file that issue.

@craxal
Copy link
Author

craxal commented Aug 29, 2016

To clarify, I see these problems when writing in Typescript. Apologies if this should be brought to the Typescript team.

This is about line spacing more than the @summary and @description tags. The Intellisense boxes (or whatever they're called) render lots of extra whitespace. For example, it doesn't seem to distinguish paragraphs well. When I break up a long description comment into multiple lines, the box renders those breaks as-typed. It shouldn't actually do that unless an empty line is in between the breaks. Similarly, the box renders a log of space between list items.

I bring up the tags, however, because @param tags seem to be handled well enough. Hovering over a parameter name in a function definition opens up a box that renders the correct @param text. It even drops the JDocs type information. If @param is recognized, why not other tags, such as those I mentioned?

@joaomoreno
Copy link
Member

joaomoreno commented Aug 30, 2016

Yep, for spacing, follow #2330 (also see last comment).

As for understanding tags, that is definitely another issue.

@craxal
Copy link
Author

craxal commented Aug 30, 2016

Ah. Great. Good to know this is being worked on. Thanks!

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants