Skip to content

Commit

Permalink
Ensure correct type checking for @see annotation
Browse files Browse the repository at this point in the history
- Refs #291
  • Loading branch information
pascalduez committed Dec 10, 2014
1 parent 26b579e commit b6f93ad
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/annotation/annotations/see.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,22 @@ module.exports = {
parse: function (text) {
var match = seeRegEx.exec(text);

return {
type: match[1] || 'function',
var obj = {
type: match[1] || 'function',
name: match[2]
};

if (obj.name.indexOf('$') === 0) {
obj.type = 'variable';
obj.name = obj.name.slice(1);
}

if (obj.name.indexOf('%') === 0) {
obj.type = 'placeholder';
obj.name = obj.name.slice(1);
}

return obj;
},

resolve: function (byTypeAndName) {
Expand Down

0 comments on commit b6f93ad

Please sign in to comment.