Skip to content

@description seems to be ignored ? #341

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

Closed
bojand opened this issue Jan 27, 2016 · 4 comments
Closed

@description seems to be ignored ? #341

bojand opened this issue Jan 27, 2016 · 4 comments
Milestone

Comments

@bojand
Copy link

bojand commented Jan 27, 2016

Looking at #9 it says @description tag is supported. I can't seem to get it to show up using either ~3.0.0 or ~4.0.0-beta and the default template.

Sample code:

/**
 * Returns number x 2
 *
 * @description Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
 * labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
 * aliquip ex ea commodo consequat.
 *
 * @param {number} num - number to double
 * @returns {number} the number doubled
 */
module.exports = function(num) {
  return num * 2;
}

Should this work? Basically I would like to have a shorter description (ie @summary which doesn't seem to be supported yet?) and then once the documentation section expanded, the greater detail (@description). @desc also gets ignored.

Thanks

@tmcw
Copy link
Member

tmcw commented Feb 15, 2016

You're right - the default description is supported, but not the tagged kind. Unchecking that box to mark it as still to-do.

@jfirebaugh
Copy link
Member

Core support for @description and @summary added in 3e4a7cb. Still need to add them to the default theme.

@tmcw
Copy link
Member

tmcw commented Apr 12, 2017

The implementation in 3e4a7cb was all we needed for @description support! The behavior of a tagged description is that it can be anywhere in a comment, instead of just at the beginning of the comment. If both are provided, the tagged description overrides the freeform one, as I'm making clear in the usejsdoc documentation. I'm going to improve test coverage here to lock this in.

tmcw added a commit that referenced this issue Apr 12, 2017
The `@description` tag allows people to specify a description of a node in any place in the JSDoc
comment, instead of only at the beginning.

Fixes #341
@tmcw tmcw closed this as completed in #720 Apr 12, 2017
tmcw added a commit that referenced this issue Apr 12, 2017
…#720)

The `@description` tag allows people to specify a description of a node in any place in the JSDoc
comment, instead of only at the beginning.

Fixes #341
@Berkmann18
Copy link

@summary seems to be ignored regardless of its position compared to @description within the same doclet. I tried having both with the @description tag removed like so:

/**
 * Default output destination.
 * @summary stdout
 * @constant
 * @type {string}
 */
const OUTPUT_DEST = 'stdout';

/**
 * @summary text  
 * Default output format.
 * @constant
 * @type {string}
 */
const OUTPUT_FORMAT = 'text';

But OUTPUT_DEST has its description being shown (same if I used @description) but OUTPUT_FORMAT has neither the summary nor the description.

I'm aware that the @summary tag isn't fully supported for both Markdown and HTML (I use both but find this would experimenting on the HTML one) but #9 pointed to this issue which was closed.

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

No branches or pull requests

4 participants