You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
453 B
20 lines
453 B
JSDOC.PluginManager.registerPlugin(
|
|
"JSDOC.commentSrcJson",
|
|
{
|
|
onDocCommentSrc: function(comment) {
|
|
var json;
|
|
if (/^\s*@json\b/.test(comment)) {
|
|
comment.src = new String(comment.src).replace("@json", "");
|
|
|
|
eval("json = "+comment.src);
|
|
var tagged = "";
|
|
for (var i in json) {
|
|
var tag = json[i];
|
|
// todo handle cases where tag is an object
|
|
tagged += "@"+i+" "+tag+"\n";
|
|
}
|
|
comment.src = tagged;
|
|
}
|
|
}
|
|
}
|
|
); |