Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Classes: examples don't show up unless a description is present? #73

Open
ambischof opened this issue Mar 17, 2016 · 7 comments
Open

Classes: examples don't show up unless a description is present? #73

ambischof opened this issue Mar 17, 2016 · 7 comments
Labels

Comments

@ambischof
Copy link

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.

@75lb
Copy link
Member

75lb commented Mar 17, 2016

can you post some code i can use to reproduce, please

@ambischof
Copy link
Author

/**
 * @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.

@75lb 75lb added the bug label Mar 17, 2016
@75lb
Copy link
Member

75lb commented Mar 17, 2016

ok, i see it now.. thanks - will look in the morning..

@mkhazov
Copy link

mkhazov commented Jul 19, 2016

In my case @example doesn't show up even if the description is set.

@danielyaa5
Copy link

You need @method see this ctumolosus/jsdoc-babel#1

@ambischof
Copy link
Author

@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.

@75lb
Copy link
Member

75lb commented May 12, 2019

Could you check whether this issue is resolved by jsdoc2md v5.0.0 please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

4 participants