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
Drop a line #3
Comments
This wouldn't be too difficult to implement. I'm on vacation until Thursday the 16th, but I can look at doing it when I get back. In the meantime you can use this format if you want: /**
* The constructor
* @constructor
* @param {Object} `options`
* @option `this` [options] sets this
* @option `that` [options] determines that
* @api public
*/ Make sure you have the property names in backticks (e.g. |
The What about when I would like multiple paragraphs, is that possible?
Or something like that. |
Sorry, was on vacation. The multiple paragraph thing is more complicated. I know this is heavy-handed, but I've intentionally avoided implementing multi-paragraph support b/c I think the goal should be to describe methods with examples and brief descriptions. Anything beyond that (again, IMHO) means that either the method is too complicated or I need to add docs beyond what is appropriate for code comments. (in other words, keep API docs brief and create user docs when more detail is needed). I know that others might not agree with this so I'm not opposed to adding multi-paragraph support for params. I'll just need to think about the best way to do it. suggestions welcome |
oh, btw it might be good to carry this conversation over to parse-comments, since that's where this logic would be implemented. |
closing since this was resolved in v1.0 of parse-comments. The comment in your example now parses to: [ { type: 'BlockComment',
value:
'\nThe constructor\n@constructor\n@param {Object} options\n * `this`: sets this\n * `that`: determines that\n@api public',
range: [ 1, 141 ],
loc:
{ start: { line: 2, column: 0 }, end: { line: 9, column: 3 } },
codeStart: null,
raw:
'*\n * The constructor\n * @constructor\n * @param {Object} options\n * * `this`: sets this\n * * `that`: determines that\n * @api public\n ',
code:
{ context: {},
value: '',
range: [ 142, 142 ],
loc:
{ start: { line: 10, column: 3 }, end: { line: 10, column: 3 } } },
description: 'The constructor',
footer: '',
examples: [],
tags:
[ { title: 'constructor', name: '', description: '' },
{ title: 'param',
name: 'options',
description: '* `this`: sets this\n * `that`: determines that',
type: { type: 'NameExpression', name: 'Object' },
inlineTags: [] },
{ title: 'api', name: 'public', description: '' } ],
inlineTags: [] } ] |
The issue with the following example is that the whole
@param
thing is rendered as one line.JSDoc actually supports this and produces multiple lines.
How would you go about doing something like this, please?
The text was updated successfully, but these errors were encountered: