Skip to content

Commit 83fa0cb

Browse files
committed
Merge branch 'justinnichols-private_api_support'
2 parents 592261d + 075db67 commit 83fa0cb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/parser.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,12 +410,20 @@ Parser.prototype._findBlockWithApiGetIndex = function(blocks) {
410410
for (var i = 0; i < blocks.length; i += 1) {
411411
var found = false;
412412
for (var j = 0; j < blocks[i].length; j += 1) {
413+
// check apiIgnore
413414
if (blocks[i][j].name.substr(0, 9) === 'apiignore') {
414415
app.log.debug('apiIgnore found in block: ' + i);
415416
found = false;
416417
break;
417418
}
418419

420+
// check app.options.apiprivate and apiPrivate
421+
if (!app.options.apiprivate && blocks[i][j].name.substr(0, 10) === 'apiprivate') {
422+
app.log.debug('private flag is set to false and apiPrivate found in block: ' + i);
423+
found = false;
424+
break;
425+
}
426+
419427
if (blocks[i][j].name.substr(0, 3) === 'api')
420428
found = true;
421429
}

0 commit comments

Comments
 (0)