Include symbols from oli.js using interface and implements tags
Instead of regex parsing, we define tags for interface and implements.
This commit is contained in:
committed by
Tim Schaub
parent
b758d92790
commit
aaf6101d0f
23
apidoc/plugins/interface.js
Normal file
23
apidoc/plugins/interface.js
Normal file
@@ -0,0 +1,23 @@
|
||||
var util = require('util');
|
||||
exports.defineTags = function(dictionary) {
|
||||
|
||||
var classTag = dictionary.lookUp('class');
|
||||
dictionary.defineTag('interface', {
|
||||
mustHaveValue: false,
|
||||
onTagged: function(doclet, tag) {
|
||||
classTag.onTagged.apply(this, arguments);
|
||||
doclet.interface = true;
|
||||
}
|
||||
});
|
||||
|
||||
dictionary.defineTag('implements', {
|
||||
mustHaveValue: true,
|
||||
onTagged: function(doclet, tag) {
|
||||
if (!doclet.implements) {
|
||||
doclet.implements = [];
|
||||
}
|
||||
doclet.implements.push(tag.value.match(/^{(.*)}$/)[1]);
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user