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

Allow @param and @return descriptions to be preceded by a newline. #227

Merged
merged 1 commit into from
Apr 22, 2014

Conversation

rgrove
Copy link
Contributor

@rgrove rgrove commented Apr 2, 2014

This fixes two bugs triggered by putting a newline before the description of a @param or @return tag. It was cramping my style, since I find this to be a more readable comment format:

/**
Main description.

@method foo

@param {String} bar
    This is the bar param.

@param {String} baz
    This is the baz param.

@return {Boolean}
    Whether or not bar and baz got fooed.
**/

Specifically, the parameter names in this case ended up as "bar!YUIDOC_LINE!" and "baz!YUIDOC_LINE!" instead of "bar" and "baz", and the return description was treated as a code block by the Markdown parser due to its indentation (whereas the precedent elsewhere in YUIDoc is to normalize indentation to the first line of a description).

This fixes two bugs that broke the @param and @return descriptions for
comments formatted like this (with a newline before the descriptions):

/**
Main description.

@method foo

@param {String} bar
    This is the bar param.

@param {String} baz
    This is the baz param.

@return {Boolean}
    Whether or not bar and baz got fooed.
**/
@caridy caridy merged commit f686d85 into yui:master Apr 22, 2014
caridy added a commit that referenced this pull request Apr 22, 2014
caridy added a commit that referenced this pull request Apr 22, 2014
@caridy
Copy link
Member

caridy commented Apr 22, 2014

  • yuidocjs@0.3.50

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

Successfully merging this pull request may close these issues.

2 participants