Clean up
Only mark symbol as unexported when it is not in the API, and no longer extract links from fires annotations because all links are handled now.
This commit is contained in:
@@ -37,7 +37,6 @@ function collectOliExports(source) {
|
|||||||
for (; i < ii; ++i) {
|
for (; i < ii; ++i) {
|
||||||
property = 'ol.' + oli[i].match(/oli.([^;]*)/)[1]
|
property = 'ol.' + oli[i].match(/oli.([^;]*)/)[1]
|
||||||
.replace('.prototype.', '#');
|
.replace('.prototype.', '#');
|
||||||
api.push(property);
|
|
||||||
unexported.push(property);
|
unexported.push(property);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -73,7 +72,6 @@ exports.handlers = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (api.indexOf(e.doclet.longname) > -1) {
|
if (api.indexOf(e.doclet.longname) > -1) {
|
||||||
// Add params, links and events of API symbols to the API
|
|
||||||
var names, name;
|
var names, name;
|
||||||
var params = e.doclet.params;
|
var params = e.doclet.params;
|
||||||
if (params) {
|
if (params) {
|
||||||
@@ -92,19 +90,9 @@ exports.handlers = {
|
|||||||
var links = e.doclet.comment.match(/\{@link ([^\}]*)\}/g);
|
var links = e.doclet.comment.match(/\{@link ([^\}]*)\}/g);
|
||||||
if (links) {
|
if (links) {
|
||||||
for (i=0, ii=links.length; i < ii; ++i) {
|
for (i=0, ii=links.length; i < ii; ++i) {
|
||||||
if (unexported.indexOf(links[i]) === -1) {
|
var link = links[i].match(/\{@link (.*)\}/)[1];
|
||||||
unexported.push(links[i].match(/\{@link (.*)\}/)[1]);
|
if (unexported.indexOf(link) === -1) {
|
||||||
}
|
unexported.push(link);
|
||||||
}
|
|
||||||
}
|
|
||||||
var fires = e.doclet.fires;
|
|
||||||
var event;
|
|
||||||
if (fires) {
|
|
||||||
for (i = 0, ii = fires.length; i < ii; ++i) {
|
|
||||||
event = fires[i].split(' ').pop();
|
|
||||||
name = event.replace('event:', '');
|
|
||||||
if (unexported.indexOf(name) === -1) {
|
|
||||||
unexported.push(name);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -119,8 +107,8 @@ exports.handlers = {
|
|||||||
}
|
}
|
||||||
var fqn = doclet.longname;
|
var fqn = doclet.longname;
|
||||||
if (fqn) {
|
if (fqn) {
|
||||||
doclet.unexported = (unexported.indexOf(fqn) !== -1);
|
doclet.unexported = (api.indexOf(fqn) === -1 && unexported.indexOf(fqn) !== -1);
|
||||||
if (api.indexOf(fqn) === -1 && !doclet.unexported) {
|
if (api.indexOf(fqn) === -1 && unexported.indexOf(fqn) === -1) {
|
||||||
e.doclets.splice(j, 1);
|
e.doclets.splice(j, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user