Added support for the @see tag.

This commit is contained in:
Michael Mathews 2011-01-16 11:49:06 +00:00
parent 176205c398
commit b309be6a01
2 changed files with 16 additions and 0 deletions

View File

@ -316,6 +316,16 @@
}
});
dictionary.defineTag('requires', {
mustHaveValue: true,
onTagged: function(doclet, tag) {
if (!doclet.requires) { doclet.requires = []; }
doclet.requires.push( firstWordOf(tag.value) );
return true;
}
});
dictionary.defineTag('returns', {
mustHaveValue: true,
canHaveType: true,
@ -442,4 +452,9 @@
}
}
function firstWordOf(string) {
var m = /^(\S+)/.exec(string);
if (m) { return m[1]; }
else { return ''; }
}
})();

View File

@ -97,6 +97,7 @@ testFile('test/t/cases/exceptiontag.js');
testFile('test/t/cases/globaltag.js');
testFile('test/t/cases/ignoretag.js');
testFile('test/t/cases/paramtag.js');
testFile('test/t/cases/requirestag.js');
testFile('test/t/cases/returnstag.js');
testFile('test/t/cases/seetag.js');
testFile('test/t/cases/sincetag.js');