75lb / yuidoc2md

A yuidoc-to-markdown generator
4 stars 3 forks source link

yuidoc2md doesn't parse nested @param tags #1

Closed amiramix closed 10 years ago

amiramix commented 10 years ago

According to the syntax reference http://yui.github.io/yuidoc/syntax/index.html yuidoc should accept nested param (see the section *param). I am trying to parse the following file

define([], function () {
    /**
    @class Helper
    */
    var Helper = {
        /**
        @method destroy
        @param {Object} [options] Data 
          to be mixed into the event 
          facade of the `change` 
          event(s) for these attributes.
          @param {Boolean} [options.silent]
            If `true`, no `change` event 
            will be fired.
        **/
        destroy: function(options){
            return "test";
        }
    };

    return Helper;
});

The output of $ ./node_modules/.bin/yuidoc2md test.js is:

#Helper

##Methods

###destroy

**Params**:  
*   options _Object_

    Data 
  to be mixed into the event 
  facade of the `change` 
  event(s) for these attributes.

So the nested options.silent is missing.

75lb commented 10 years ago

Hi, thanks for the report and test case :+1:

All fixed now, run npm update yuidoc2md

amiramix commented 10 years ago

Cool, many thanks for fixing it so quick :)