mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
Added support for the @see tag.
This commit is contained in:
parent
176205c398
commit
b309be6a01
@ -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 ''; }
|
||||
}
|
||||
})();
|
||||
@ -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');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user