Skip to content

Commit

Permalink
Merge branch 'justinnichols-private_api_support'
Browse files Browse the repository at this point in the history
  • Loading branch information
rottmann committed Jan 13, 2017
2 parents 592261d + 075db67 commit 83fa0cb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -410,12 +410,20 @@ Parser.prototype._findBlockWithApiGetIndex = function(blocks) {
for (var i = 0; i < blocks.length; i += 1) {
var found = false;
for (var j = 0; j < blocks[i].length; j += 1) {
// check apiIgnore
if (blocks[i][j].name.substr(0, 9) === 'apiignore') {
app.log.debug('apiIgnore found in block: ' + i);
found = false;
break;
}

// check app.options.apiprivate and apiPrivate
if (!app.options.apiprivate && blocks[i][j].name.substr(0, 10) === 'apiprivate') {
app.log.debug('private flag is set to false and apiPrivate found in block: ' + i);
found = false;
break;
}

if (blocks[i][j].name.substr(0, 3) === 'api')
found = true;
}
Expand Down

0 comments on commit 83fa0cb

Please sign in to comment.