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

Blank lines in Hovers are unexpectedly removed #10311

Closed
DanTup opened this issue Aug 8, 2016 · 11 comments
Closed

Blank lines in Hovers are unexpectedly removed #10311

DanTup opened this issue Aug 8, 2016 · 11 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug *duplicate Issue identified as a duplicate of another issue(s)
Milestone

Comments

@DanTup
Copy link
Contributor

DanTup commented Aug 8, 2016

  • VSCode Version: 1.4.0
  • OS Version: Windows 10

A user of my extension raised an issue reporting that blank lines are unexpectedly stripped from tooltips:

Formatting lost

This seems to be being done by Code. Is there something I need to do to preserve them?

Both this user and I would expect them to remain. An extension can strip them out if that's how it chooses to display them but it seems strange/unexpected if they're always stripped for us.

@jrieken
Copy link
Member

jrieken commented Aug 9, 2016

stuff is being send through markdown...

@DanTup
Copy link
Contributor Author

DanTup commented Aug 9, 2016

Does this mean it's intended or is this just notes on investigation?

@jrieken jrieken added this to the August 2016 milestone Aug 9, 2016
@jrieken jrieken added the bug Issue identified by VS Code Team member as probable bug label Aug 9, 2016
@jrieken jrieken closed this as completed in 6280dcb Aug 9, 2016
@DanTup
Copy link
Contributor Author

DanTup commented Aug 28, 2016

@jrieken I think the fix for this may have introduced more spacing than expected. Check out this sample (this is Insiders dated 26th Aug):

_italic_ **bold**.

And some \`inline code\`.

* List item 1
* List item 2

    * Indented list item

Code blocks are supported

    final name = "Danny";
    print(name);

Links can be:

* http://www.just-a-bare-url.com
* [with the URL inline](http://google.com)
* [or separated out][ref link]

[ref link]: http://google.com

# A Header

## A subheader

### A subsubheader

#### If you need this many levels of headers, you're doing it wrong

and here's how it renders:

Hovers

@jrieken
Copy link
Member

jrieken commented Aug 29, 2016

That's a problem with list-tag-element we are tracking separately

@DanTup
Copy link
Contributor Author

DanTup commented Aug 29, 2016

@jrieken Great; thanks. I can't find a case so if you know what it's called so I can subscribe to it let, let me know (not a big deal if not easy to find though). Thanks!

@DanTup
Copy link
Contributor Author

DanTup commented Aug 31, 2016

@jrieken Did anything change in yesterday/todays Insiders that would cause this to come back? It doesn't look like there were any more changes to the file you updated, but in Insiders I'm seeing it broken again?

Newlines

@DanTup
Copy link
Contributor Author

DanTup commented Aug 31, 2016

Here's a screenshot from last week vs today:

Hovers

The string I'm returning is:

_italic_ **bold**.

And some \`inline code\`.

* List item 1
* List item 2

    * Indented list item

Code blocks are supported

    final name = "Danny";
    print(name);

Links can be:

* http://www.just-a-bare-url.com
* [with the URL inline](http://google.com)
* [or separated out][ref link]

[ref link]: http://google.com

# A Header

## A subheader

### A subsubheader

#### If you need this many levels of headers, you're doing it wrong

@jrieken
Copy link
Member

jrieken commented Sep 1, 2016

@DanTup Do not comment on closed issues esp not with stuff like 'I also saw this thing'

@DanTup
Copy link
Contributor Author

DanTup commented Sep 1, 2016

@jrieken Apologies, but I'm seeing the same issue that I raised this case for so I figured you'd rather re-open the existing case than get an exact dupe.

There are a couple of closed issues I commented on; should I always raise new issues even if they're the same or relating to the fix?

@joaomoreno
Copy link
Member

joaomoreno commented Sep 2, 2016

@DanTup You might want to follow #2330, I will give hover a well deserved facelift.

I'll mark this as a duplicate.

What @jrieken meant with his first comment is that the text rendered there is Markdown, which doesn't preserve whitespace unless you wrap the text in triple backticks, like this:

/**
 * ```
 * first line
 *
 * second line
 *
 * third line
 * ```
 */
function bar() {

}

@joaomoreno joaomoreno added the *duplicate Issue identified as a duplicate of another issue(s) label Sep 2, 2016
@DanTup
Copy link
Contributor Author

DanTup commented Sep 2, 2016

@joaomoreno Cool; I was thinking the hovers could be tidied up a little :)

Markdown normally preserves normal space between paragraphs, lines aren't all shoved together. However I raised #11409 after @jrieken requested not to comment on closed issues, there's some better discussion about this there :-)

@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
bug Issue identified by VS Code Team member as probable bug *duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

3 participants