diff --git a/modules/jsdoc/docset.js b/modules/jsdoc/docset.js index e7c9e81c..8931a6e6 100644 --- a/modules/jsdoc/docset.js +++ b/modules/jsdoc/docset.js @@ -7,6 +7,13 @@ doclets = exports.doclets = []; + /** @method */ + doclets.addDoclet = function(doclet) { + if (!doclet.hasTag('ignore')) { + this.push(doclet); + } + } + /** @method */ doclets.getDocsByPath = function(docName) { var foundDocs = [], diff --git a/modules/jsdoc/parser.js b/modules/jsdoc/parser.js index f1123640..952bede0 100644 --- a/modules/jsdoc/parser.js +++ b/modules/jsdoc/parser.js @@ -23,7 +23,7 @@ thisDoclet = doclet.makeDoclet(commentSrc, comment, currentSourceName); if ( thisDoclet.hasTag('name') && thisDoclet.hasTag('isa') ) { - doclets.push(thisDoclet); + doclets.addDoclet(thisDoclet); if (thisDoclet.tagValue('isa') === 'module') { name.setCurrentModule( thisDoclet.tagValue('path') ); } @@ -46,7 +46,7 @@ if (thisDoclet.hasTag('isa') && !thisDocletName) { thisDoclet.setName('' + node.name); - doclets.push(thisDoclet); + doclets.addDoclet(thisDoclet); } name.refs.push([node, thisDoclet]); @@ -72,7 +72,7 @@ if (thisDoclet.hasTag('isa') && !thisDocletName) { nodeName = name.resolveThis( nodeName, node, thisDoclet ); thisDoclet.setName(nodeName); - doclets.push(thisDoclet); + doclets.addDoclet(thisDoclet); } name.refs.push([node.right, thisDoclet]); } @@ -97,7 +97,7 @@ if (thisDoclet.hasTag('isa') && !thisDocletName ) { thisDocletName = n.target.string; thisDoclet.setName(thisDocletName); - doclets.push(thisDoclet); + doclets.addDoclet(thisDoclet); } } } diff --git a/test/samples/tag_ignore.js b/test/samples/tag_ignore.js new file mode 100644 index 00000000..c145eda5 --- /dev/null +++ b/test/samples/tag_ignore.js @@ -0,0 +1,11 @@ + + /** + @ignore + @name Foo + @constructor + */ + + /** + @name Bar + @constructor + */ \ No newline at end of file