Skip to content

Commit 4c70fab

Browse files
committed
Merge pull request #91 from jbalsas/jbalsas/fix_78
Show any tag related information
2 parents 1e1434b + 2d3ca60 commit 4c70fab

File tree

5 files changed

+16
-15
lines changed

5 files changed

+16
-15
lines changed

lib/language/js/GoogleClosureProcessor.js

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
params = [],
8484
modifiers = [],
8585
returns = null,
86+
tags = [],
8687
unsupported = [];
8788

8889
if (comment.ctx) {
@@ -101,8 +102,8 @@
101102
if (comment.ctx.scope && comment.ctx.scope.type === 'class') {
102103
modifiers.push('STATIC');
103104
}
104-
105-
comment.tags = comment.tags.map(function (tag) {
105+
106+
_.each(comment.tags, function (tag) {
106107
var returnTag = false;
107108

108109
switch (tag.type) {
@@ -175,7 +176,7 @@
175176
case "see":
176177
returnTag = {
177178
key: "See",
178-
value: "<a href='#'>" + tag.local + "</a>"
179+
value: tag.string
179180
};
180181
break;
181182

@@ -192,19 +193,17 @@
192193
break;
193194
}
194195

195-
return returnTag;
196+
if (returnTag) {
197+
tags.push(returnTag);
198+
}
196199
});
197200

198201
comment.examples = examples;
199202
comment.modifiers = modifiers;
200203
comment.params = params;
201204
comment.returns = returns;
205+
comment.tags = tags;
202206
comment.unsupported = unsupported;
203-
204-
if (comment.isPrivate) {
205-
comment.tags.push({key: 'Private'});
206-
}
207-
208207
}
209208

210209
return comment;

lib/language/js/ModuleParser.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@
128128
module.classes[context.name] = {
129129
constructor: comment,
130130
properties: [],
131-
methods: []
131+
methods: [],
132+
tags: comment.tags
132133
};
133134

134135
} else {
@@ -157,7 +158,6 @@
157158
}
158159
});
159160
}
160-
161161
}
162162
});
163163

templates/module/classes.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ <h4>
2626
{{/constructor.params}}
2727
</dl>
2828

29+
{{> tags}}
30+
2931
{{> examples}}
3032

3133
<button class="btn btn-small show-code">Show code</button>

templates/module/function.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ <h4>
1515
<div class="description">{{{description.full}}}</div>
1616

1717
{{> params}}
18-
{{> returns}}
18+
{{> returns}}
19+
{{> tags}}
1920
{{> examples}}
2021
{{> additional}}
2122
{{> code}}

templates/module/returns.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<dl>
22
{{#returns}}
3-
<dt>Returns: <span class="label label-info">{{types}}</span>
4-
</dt>
3+
<dt>Returns: <span class="label label-info">{{types}}</span></dt>
54
<dd>{{{description}}}</dd>
65
{{/returns}}
7-
</dl>
6+
</dl>

0 commit comments

Comments
 (0)