You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** This is a JSDoc comment
* <ul>
* <li> First Item </li>
* <li> Second Item </li>
* </ul>
* @description <p> Description tags are supposed to support HTML formatting </p>
* @constructor
* @param {Streamer} in_stream - (Optional) An "inbound" stream with data to be read.
*/
Mouse over the class/object/variable you tried to document and see that everything is rendered as plain text.
VSCode will display JSDoc comments as documentation on mouseover, however with it rendering any html markup as plaintext, comments that would normally display with orderly lists, line breaks, and paragraphs is all mashed together in a cluttered mess with no new lines.
For example the Jsdoc in the first step renders as:
Creates a Header
<ul><li> First Item </li><li> Second Item </li></ul>
@description <p> Description tags are supposed to support HTML formatting </p>
@constructor
@param {Streamer} in_stream - (Optional) An "inbound" stream with data to be read.
I did notice that if you do this:
/** Blah blah blah
*
* Own Line
*
* Another Line
*/
VsCode will render this as:
Blah blah blah
Own Line
Another Line
when you mouseover the documented item. Note that to get "Own Line" and "Another Line" on their own lines, it took an extra blank line.
Please do not render html tags in comments, or at least treat </br>, <p> etc. as new lines so that there is some semblance of formatting being applied to displayed documentation. Writing jsdoc comments that are intended to render nicely in VSCode require an inordinate amount of wasted lines just to accomplish what a<p> or </br> would accomplish on the same line.
With how things are now you have to pick between displaying Jsdoc documentation nicely in HTML, or have it readable in VScode, you can't have both without one or the other being poorly formatted if not unreadable.
Reproduces without extensions: Yes/No
The text was updated successfully, but these errors were encountered:
At the very least, stripping out html tags would work, but VSCode rendering Jsdoc comments without newlines makes all but the simplest explanations of code a pain to read.
We support markdown (without html tag support) in jsdocs. You can use this to express lists and other elements. We don't support html content.
Markdown normally combines text separated by single lines into a paragraph. If you want to ensure you have a newline, end with the sentence with two spaces:
/** *Blah blah blah * Own Line *Another Line */functionfoo(){}
Steps to Reproduce:
VSCode will display JSDoc comments as documentation on mouseover, however with it rendering any html markup as plaintext, comments that would normally display with orderly lists, line breaks, and paragraphs is all mashed together in a cluttered mess with no new lines.
For example the Jsdoc in the first step renders as:
I did notice that if you do this:
VsCode will render this as:
when you mouseover the documented item. Note that to get "Own Line" and "Another Line" on their own lines, it took an extra blank line.
Please do not render html tags in comments, or at least treat
</br>, <p>
etc. as new lines so that there is some semblance of formatting being applied to displayed documentation. Writing jsdoc comments that are intended to render nicely in VSCode require an inordinate amount of wasted lines just to accomplish what a<p>
or</br>
would accomplish on the same line.With how things are now you have to pick between displaying Jsdoc documentation nicely in HTML, or have it readable in VScode, you can't have both without one or the other being poorly formatted if not unreadable.
Reproduces without extensions: Yes/No
The text was updated successfully, but these errors were encountered: