jsdoc2md / grunt-jsdoc-to-markdown

Markdown API documentation generator
MIT License
16 stars 4 forks source link

Nested tables? #7

Closed FezVrasta closed 8 years ago

FezVrasta commented 8 years ago

I have a jsdoc comment like this:

    /**
     * Create a new Popper.js instance
     * @constructor Popper
     * @param {HTMLElement} trigger
     * @param {HTMLElement|Object} popper
     *      The HTML element used as popper, or a configuration used to generate the popper.
     * @param {String} [popper.tagName='div'] The tag name of the generated popper.
     * @param {Array} [popper.classNames=['popper']] Array of classes to apply to the generated popper.
     * @param {Array} [popper.attributes] Array of attributes to apply, specify `attr:value` to assign a value to it.
     * @param {HTMLElement|String} [popper.parent=window.document.body] The parent element, given as HTMLElement or as query string.
     * @param {String} [popper.content] The content of the popper, it can be text or HTML, in case of HTML, enable `allowHtml`.
     * @param {Boolean} [popper.allowHtml=false] If set to true, the `content` will be parsed as HTML.
     * @param {String} [popper.arrow.tagName='div'] Same as `popper.tagName` but for the arrow element.
     * @param {Array} [popper.arrow.classNames='popper__arrow'] Same as `popper.classNames` but for the arrow element.
     * @param {String} [popper.arrow.attributes=['x-arrow']] Same as `popper.attributes` but for the arrow element.
     * @param {Object} options
     * @param {String} [options.placement=bottom]
     *      Placement of the popper accepted values: `top(-left, -right), right(-left, -right), bottom(-left, -right),
     *      left(-left, -right)`
     *
     * @param {Boolean} [options.gpuAcceleration=true]
     *      When this property is set to true, the popper position will be applied using CSS3 translate3d, allowing the
     *      browser to use the GPU to accelerate the rendering.
     *      If set to false, the popper will be placed using `top` and `left` properties, not using the GPU.
     *
     * @param {Number} [options.offset=0]
     *      Amount of pixels the popper will be shifted (can be negative).
     *
     * @param {String|Element} [options.boundariesElement='viewport']
     *      The element which will define the boundaries of the popper position, the popper will never be placed outside
     *      of the defined boundaries (except if `keepTogether` is enabled)
     *
     * @param {Number} [options.boundariesPadding=5]
     *      Additional padding for the boundaries
     *
     * @param {Array} [options.preventOverflowOrder=['left', 'right', 'top', 'bottom']]
     *      Order used when Popper.js tries to avoid overflows from the boundaries, they will be checked in order,
     *      this means that the last ones will never overflow
     *
     * @param {String|Array} [options.flipBehavior='flip']
     *      The behavior used by the `flip` modifier to change the placement of the popper when the latter is trying to
     *      overlap its trigger element. Defining `flip` as value, the placement will be flipped on
     *      its axis (`right - left`, `top - bottom`).
     *      You can even pass an array of placements (eg: `['right', 'left', 'top']` ) to manually specify
     *      how alter the placement when a flip is needed. (eg. in the above example, it would first flip from right to left,
     *      then, if even in its new placement, the popper is overlapping its trigger, it will be moved to top)
     *
     * @param {Array} [options.modifiers=[ 'shift', 'offset', 'preventOverflow', 'keepTogether', 'arrow', 'flip', 'applyStyle']]
     *      List of functions used to modify the data before they are applied to the popper, add your custom functions
     *      to this array to edit the offsets and placement.
     *      The function should reflect the @params and @returns of preventOverflow
     *
     * @param {Array} [options.modifiersIgnored=[]]
     *      Put here any built-in modifier name you want to exclude from the modifiers list
     *      The function should reflect the @params and @returns of preventOverflow
     */

The problem is with [popper.content] [popper.something]. With the original JSDoc generator I get a nested table. With jsdoc2md it's not parsed at all.

75lb commented 8 years ago

i just generated the output and don't see the issue.. what exactly was not parsed?

FezVrasta commented 8 years ago

Compare your output with the one generated by the default template of jsdoc.

with the default template, the table will include sub-tables to describe the [popper.content], with your output instead you will get a single table.

75lb commented 8 years ago

nested tables possible are not possible with markdown.. try using --param-list-format list, i think it produces cleaner output in your case.

FezVrasta commented 8 years ago

Thanks, I've already resolved writing a JSON exporter I then used to generate the jekyll page.