jsdoc: multiline description @property

前端 未结 3 794
星月不相逢
星月不相逢 2021-01-12 20: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         


        
相关标签:
3条回答
  • 2021-01-12 20:59

    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. 
    
    0 讨论(0)
  • 2021-01-12 21:01
    /**
     * @property {String} mode mode of display
     * <br>&nbsp;&nbsp;`video` - display video, or
     * <br>&nbsp;&nbsp;`audio` - plays only the audio
     * @property...
     */
    
    

    Actual output:

    0 讨论(0)
  • 2021-01-12 21:06

    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

    0 讨论(0)
提交回复
热议问题