jsdoc-to-markdown
jsdoc-to-markdown copied to clipboard
Classes: examples don't show up unless a description is present?
Probably because the example is put in the same section as the description, but if the description is not set, the example doesn't show up.
can you post some code i can use to reproduce, please
/**
* @class Storage
* @classdesc
* An app wide storage/state persistence solution with direct and radio connectivity.
* Can be accessed:
* * directly through the instance via member functions,
* * through the radio channel "storage"
*
* Typically it's probably better to access through the radio, so that there's no need to have a reference to app.
*
* **Note: There can only be one instance of this class.** Because there can only be one instance of the "storage" radio channel.
*
* Radio Handles:
* * "set:item" -> radio proxy for setItem (same parameters)
* * "get:item" -> radio proxy for getItem (same parameters and return)
*
* @todo Use localStorage or sessionStorage
* @todo Further consider the identifier scheme for pages. Right now pages use their url, but it may not be the best way?
* @example
* app.storage = new Storage();
*
* app.storage.setItem('userdashboard', 'foo', 'bar');
* app.storage.getItem('userdashboard', foo);
* // -> "bar"
*
* //same result as above.
* Backbone.Radio.channel('storage').trigger('set:item', 'userdashboard', 'foo', 'bar');
* Backbone.Radio.channel('storage').request('get:item', 'userdashboard', 'foo');
* // -> "bar"
*/
If you add a line or two at the top for the description, the example is rendered as expected.
ok, i see it now.. thanks - will look in the morning..
In my case @example doesn't show up even if the description is set.
You need @method see this https://github.com/ctumolosus/jsdoc-babel/issues/1
@danielyaa5 I don't think that's relevant for this issue. Besides, @method is short for @type method and @class is short for @type class. It wouldn't make sense to use that.
Could you check whether this issue is resolved by jsdoc2md v5.0.0 please?