6

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
  • 40,814
  • 19
  • 140
  • 246
mido
  • 20,728
  • 10
  • 84
  • 109
  • 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

3 Answers3

7
/**
 * @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
  • 383
  • 2
  • 7
6

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,853
  • 1
  • 28
  • 61
2

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
  • 29
  • 1
  • 2