Permalink
Browse files

Support for known tag aliases

ref #45

- Adds support for aliases for the tags which currently work
  • Loading branch information...
1 parent fdd0107 commit ab8ac50d9d830af9be9df50346d340af7014df1d @ErisDS ErisDS committed May 5, 2014
Showing with 15 additions and 0 deletions.
  1. +15 −0 src/docker.js
View
@@ -657,27 +657,42 @@ Docker.prototype.parseMultiline = function(comment){
var tagType = tag.type = bits.shift();
switch(tagType){
+ case 'arg':
+ case 'argument':
case 'param':
// `@param {typename} paramname Parameter description`
if(bits[0].charAt(0) == '{') tag.types = grabType(bits).split(/ *[|,\/] */);
tag.name = bits.shift() || '';
tag.description = bits.join(' ');
+ tag.type = 'param';
break;
+ case 'returns':
case 'return':
// `@return {typename} Return description`
if(bits[0].charAt(0) == '{') tag.types = grabType(bits).split(/ *[|,\/] */);
tag.description = bits.join(' ');
+ tag.type = 'return';
break;
case 'type':
// `@type {typename}`
tag.types = grabType(bits).split(/ *[|,\/] */);
break;
+ case 'access':
case 'api':
// `@api public` or `@api private` etc.
tag.visibility = bits.shift();
+ tag.type = 'api';
+ break;
+
+ case 'private':
+ case 'protected':
+ case 'public':
+ // `@public` or `@private` etc.
+ tag.visibility = tagType;
+ tag.type = 'api';
break;
case 'see':

0 comments on commit ab8ac50

Please sign in to comment.