Skip to content
Browse files

Added default handling for tags

closes #45
- any tag not matched by the switch is treated similarly to a param or
  return, supporting name (the tag), types and description
  • Loading branch information...
1 parent fdd0107 commit c961504cedc294af8b8e84cbccdfdb29d80d1a29 @ErisDS ErisDS committed May 6, 2014
Showing with 20 additions and 0 deletions.
  1. +15 −0 res/jsDoc.jst
  2. +5 −0 src/docker.js
View
15 res/jsDoc.jst
@@ -71,6 +71,21 @@ if(tags.length){
</span>
<% }
+ if(tag.type == 'unknown'){ %>
+ <div class="dox_tag_title"><%= tag.name %></div>
+ <div class="dox_tag_detail">
+<% if(tag.types){
+ for(var j = 0; j < tag.types.length; j += 1){ %>
+ <span class="dox_type"><%= tag.types[j] %></span>
+<% }
+ }
+
+ if(tag.description){ %>
+ <span><%= md(tag.description, true) %></span>
+<% } %>
+ </div>
+<% }
+
if(tag.type == 'see'){ %>
<div class="dox_tag_title">See</div>
<div class="dox_tag_detail">
View
5 src/docker.js
@@ -689,6 +689,11 @@ Docker.prototype.parseMultiline = function(comment){
tag.local = bits.join(' ');
}
break;
+ default:
+ if(bits[0].charAt(0) == '{') tag.types = grabType(bits).split(/ *[|,\/] */);
+ tag.description = bits.join(' ');
+ tag.name = tagType;
+ tag.type = 'unknown';
}
return tag;

0 comments on commit c961504

Please sign in to comment.
Something went wrong with that request. Please try again.