Skip to content

Conversation

@amadeus
Copy link
Collaborator

@amadeus amadeus commented Apr 22, 2016

I am not sure exactly why this problem exists, but it causes some weird side effects.

Before this commit:
before

After this commit:
after

The arrows point out the syntax errors, and there's a deeper problem. If you use % on the opening { of the function, it will match with the second } in the comment. It should of course match the final closing } of the function.

The fix I have for it, is to only match on paired opening and closing curly brackets. I have not noticed any issues to existing JSDoc comments.

@amadeus
Copy link
Collaborator Author

amadeus commented Apr 22, 2016

And here's a copy/pastable snippet from the screenshot if you want to test yourselves:

(function(){

var testOb = {

    /**
    * test text {@link #add} or {@link #addOnce}.
    * @property {boolean} memorize
    */
    memorize: false,
};

})();

@amadeus amadeus force-pushed the fix-jsdocparam branch 2 times, most recently from b1a9602 to daaf280 Compare April 23, 2016 22:26
@amadeus amadeus mentioned this pull request Apr 23, 2016
@amadeus amadeus merged commit c438302 into pangloss:develop Apr 24, 2016
@amadeus amadeus deleted the fix-jsdocparam branch April 24, 2016 18:03
@amadeus
Copy link
Collaborator Author

amadeus commented Apr 24, 2016

I haven't noticed any side effects from this pr, so going ahead and merging it in since it's pretty basic.

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.

1 participant