I added a new plugin to jsdoc, introducing a new tag:
dictionary.defineTag("newtag", {
mustHaveValue: false,
canHaveType: false,
canHaveName: true,
onTagged: function(doclet, tag) {
doclet.newtag = tag.value;
doclet.kind = "newitem";
}
});
But jsDoc seems to only create a new doclet when the comment is followed by some javascript code. This works:
/**
* @newtag name
*/
somename = function(){};
But this does not get recognized:
/**
* @newtag name
*/
The native jsDoc tag @module does not require trailing code either so it should definately somehow be possible to add comments without code. But why does it not work in my case?