jsdoc: multiline description @property

你说的曾经没有我的故事 提交于 2019-12-01 20:51:46

问题


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...


回答1:


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. did the trick.



回答2:


/**
 * @property {String} mode mode of display
 * <br>&nbsp;&nbsp;`video` - display video, or
 * <br>&nbsp;&nbsp;`audio` - plays only the audio
 * @property...
 */

Actual output:



来源:https://stackoverflow.com/questions/28733282/jsdoc-multiline-description-property

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!