20

I am documenting my code using jsdoc, so far so good, I have a comment like below

...
* @property {string}  mode -  mode of display 'video' - display video or 'audio' - play only the audio.
* @property...

and it comes in html document like

| ...   |         |                                 
| mode  | string  | mode of display 'video' - display video or 'audio' - play only the audio.|
| ...   |         |                                 

I want it to appear something like

| ...   |         |                                 |
| mode  | string  | mode of display                 |
|       |         |   'video' - display video       |
|       |         |   'audio' - play only the audio.|
| ...   |         |                                 |

hope I am making myself clear...

Mogsdad
  • 44,709
  • 21
  • 151
  • 275
mido
  • 24,198
  • 15
  • 92
  • 117
  • 1
    What have you tried so far? Post some examples of what got you to this point so that others have a jumping-off point and can better guide you. – Stonz2 Feb 26 '15 at 02:14
  • try to insert
    -tags, this could work if they would not be escaped...
    – Marvin Emil Brach Feb 26 '15 at 02:15
  • @Stonz2, this is more configuration related, searched the net without much luck, also I am quite new to jsdoc, not even sure what to try, and the source http://usejsdoc.org is not of much help – mido Feb 26 '15 at 02:20
  • @MarvinEmilBrach thx, ```mode of display
    &nbsp&nbsp 'video' - display video
    &nbsp&nbsp 'audio' - play only the audio.``` did the trick.
    – mido Feb 26 '15 at 02:23

4 Answers4

18

By using a minus sign you can avoid <br> (moreover not working in vscode)

  /**
   * @property {String} editMode editing mode
   * - A: description for A
   * - B: description for B
   * - C: description for C
   */

getting a bullet list:

enter image description here

ʞᴉɯ
  • 5,376
  • 7
  • 52
  • 89
8
/**
 * @property {String} mode mode of display
 * <br>&nbsp;&nbsp;`video` - display video, or
 * <br>&nbsp;&nbsp;`audio` - plays only the audio
 * @property...
 */

Actual output:

enter image description here

caffeinatedbits
  • 471
  • 5
  • 8
7

for this you can simply add two line spaces instead of one for example:

this

/**
 * decription
 * modes:
 * I am foo
 * I am bar
 */

results to :

decription modes: I am foo I am bar

But

this

 /**
 * decription
 * 
 * modes:
 * 
 * I am foo
 * 
 * I am bar
 * 
 */

results to :

decription

modes:

I am foo

I am bar

F4RZ1N
  • 129
  • 2
  • 2
5

You have to use br-Tags to resolve new new lines:

mode of display <br>&nbsp;&nbsp; 'video' - display video <br>&nbsp;&nbsp; 'audio' - play only the audio. 
Marvin Emil Brach
  • 3,984
  • 1
  • 32
  • 62