Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Completion documentation strings sometimes being formatted as code #328

Closed
jakebailey opened this issue Oct 31, 2018 · 4 comments
Closed
Assignees
Labels
bug Something isn't working
Milestone

Comments

@jakebailey
Copy link
Member

The function signature and docstring are getting mixed together, so the actual text bit is getting syntax formatted. For example:

image

This only happens with completion, as I can hover and see:

image

Where the docstring isn't being treated that way.

@jakebailey jakebailey added the bug Something isn't working label Oct 31, 2018
@jakebailey
Copy link
Member Author

And just to check, I went back to before my plaintext-as-default fix, and that didn't seem to matter.

The code that generates the completion content and the hover content is different, so the completion part may need fixing.

@MikhailArkhipov
Copy link

MikhailArkhipov commented Oct 31, 2018

It is VS Code issue. You can observe similar effect in C#. We actually DO terminate code block with signature (bounded by triple-ticks) but VS Code leaks formatting into the subsequent code. I opened microsoft/vscode#49018 long time ago, but it did not repro in a simple case. Or maybe not use html as a language for preformatted block.

@jakebailey
Copy link
Member Author

jakebailey commented Oct 31, 2018

Interestingly, if I copy some of the hover code and forcibly call RestTextConverter.ToMarkdown on the doc (even through it's already markdown), I get something slightly better:

image

From the debugger I can see it adding HTML style line breaks, which seem to work for some reason. The original string that would have been returned does appear to be as you describe. Weird.

(Mind you that RestTextConverter would have already been called, so it's basically being called twice...)

@jakebailey
Copy link
Member Author

As of #596 and other tooltip changes, this should no longer be the case.

@jakebailey jakebailey added this to the Feb 2019.1 milestone Feb 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants