jbt / docker

Documentation generator
http://jbt.github.com/docker
MIT License
233 stars 56 forks source link

JSDoc tags can't be indented #22

Closed adambiggs closed 11 years ago

adambiggs commented 11 years ago

I've only used this in CoffeeScript so far, but I noticed that JSDoc tags aren't formatted if there's any white space in the same line before them.

adambiggs commented 11 years ago

I found out it works if I add * before the indented lines, but it's a bit picky...

Doesn't work:

    ###
    @return {Object}
    ###
    ###
    * @return {Object}
    ###
    ### *
    * @return {Object}
    ###

Works:

    ###
@return {Object}
    ###
    ###
    *
    * @return {Object}
    ###
jbt commented 11 years ago

That's very odd. I admit I haven't done all that much testing with jsDoc in coffeescript. I'll take a look and see if I can figure out what's going on

adambiggs commented 11 years ago

FYI, after a little more looking around I think the best syntax for JSDoc in CoffeeScript is:

    ###*
     * @return {Object}
     ###

Which compiles to:

    /**
     * @return {Object}
     */
jbt commented 11 years ago

Ok I've put in a load of tweaks and tried it on as many use-cases as I can think of, and I'm pretty sure it all works fine now. Feel free to reopen if I've missed something though.

adambiggs commented 11 years ago

Just tried out v0.2.3 and these cases now work great:

    ###
    @return {Object}
    ###
    ###
    * @return {Object}
    ###

But this one still fails:

    ###*
     * @return {Object}
     ###

Seems to be a problem with the trailing * in ###*.