From c5a24af559a7c206c30d2d2dc7d8ee346d97ae52 Mon Sep 17 00:00:00 2001 From: "Christopher D. Parks" Date: Thu, 3 Apr 2014 11:43:24 -0700 Subject: [PATCH] We should compare filepath with excluded path using "starts-with" because the filepath may be a child of the excluded path This makes the excludes array work when using -r --- lib/jsdoc/src/filter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jsdoc/src/filter.js b/lib/jsdoc/src/filter.js index 019f5173..135c4c4f 100644 --- a/lib/jsdoc/src/filter.js +++ b/lib/jsdoc/src/filter.js @@ -57,7 +57,7 @@ exports.Filter.prototype.isIncluded = function(filepath) { if (this.exclude) { this.exclude.forEach(function(exclude) { - if ( exclude === filepath || exclude === path.dirname(filepath) ) { + if ( filepath.indexOf(exclude) === 0 ) { included = false; } });