Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Commit 60daf87

Browse files
author
obelghitialaoui
committed
add explanation comment
1 parent 0a3bf39 commit 60daf87

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/parser.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ function Parser(_app) {
5151
}
5252
});
5353

54+
// check app.options.filterBy and define the tag to filer by
5455
if (app.options.filterBy) {
5556
var tag = app.options.filterBy.split('=')[0];
5657
filterTag = (tag.indexOf('api') !== -1) ? tag : null;
@@ -416,6 +417,7 @@ Parser.prototype._findBlocks = function() {
416417
*/
417418
Parser.prototype._findBlockWithApiGetIndex = function(blocks) {
418419
var foundIndexes = [];
420+
// get value to filter by
419421
var valueTofilter = (filterTag) ? app.options.filterBy.split('=')[1] : null;
420422
for (var i = 0; i < blocks.length; i += 1) {
421423
var found = false;
@@ -435,8 +437,10 @@ Parser.prototype._findBlockWithApiGetIndex = function(blocks) {
435437
found = false;
436438
break;
437439
}
438-
440+
441+
// check if the user want to filter by some specifique tag
439442
if (filterTag) {
443+
// we need to add all apidefine
440444
if (blocks[i][j].name.substr(0, 9) === 'apidefine') {
441445
isDefine = true;
442446
}

0 commit comments

Comments
 (0)