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 optional types on tags #166

Merged
merged 5 commits into from
Apr 19, 2015
Merged

Conversation

parasyte
Copy link
Contributor

Fixes exceptions when a tag is missing its optional type. E.g.:

/**
 * Testing!
 * @name test
 * @enum
 */

Raises an exception:

TypeError: Cannot read property 'substr' of undefined
    at Object.exports.parseTagTypes (.../node_modules/dox/lib/dox.js:413:38)
    at exports.parseTag (.../node_modules/dox/lib/dox.js:357:15)
    at Array.map (native)
    at Object.exports.parseComment (.../node_modules/dox/lib/dox.js:223:34)
    at Object.exports.parseComments (.../node_modules/dox/lib/dox.js:112:25)

parasyte added a commit to parasyte/node-capstone that referenced this pull request Apr 18, 2015
- dox needs a patch to build documentation successfully, but this gets the docs in a stable state
- See: tj/dox#166
@Twipped
Copy link
Collaborator

Twipped commented Apr 19, 2015

If it's not too much trouble, could you please add a test case for this?

On Sat, Apr 18, 2015 at 4:38 AM, Jay Oster notifications@github.com wrote:

Fixes exceptions when a tag is missing its optional type. E.g.:

/** * Testing! * @name test * @enum */

Raises an exception:

TypeError: Cannot read property 'substr' of undefined
at Object.exports.parseTagTypes (.../node_modules/dox/lib/dox.js:413:38)
at exports.parseTag (.../node_modules/dox/lib/dox.js:357:15)
at Array.map (native)
at Object.exports.parseComment (.../node_modules/dox/lib/dox.js:223:34)
at Object.exports.parseComments (.../node_modules/dox/lib/dox.js:112:25)


You can view, comment on, or merge this pull request online at:

#166
Commit Summary

  • Allow optional types on tags

File Changes

Patch Links:


Reply to this email directly or view it on GitHub
#166.

@parasyte
Copy link
Contributor Author

For sure! Will do in a bit.

Looks like this was fixed once and regressed: #137

@parasyte
Copy link
Contributor Author

@ChiperSoft I added a simple test for this one.

- The head of the tag description was dropped if the first part is not a type specifier
@parasyte
Copy link
Contributor Author

Discovered a few other edge cases while writing more tests. I'm happy with it now.

@Twipped
Copy link
Collaborator

Twipped commented Apr 19, 2015

Awesome, thank you very much.

Twipped added a commit that referenced this pull request Apr 19, 2015
@Twipped Twipped merged commit deedbd0 into tj:master Apr 19, 2015
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