Conversation
Hello, Thank you for your contributions! I'll try and test that asap! |
Hello @NicolasCARPi, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also add simple comments to your code to tell why you are doing things? What is the purpose of variables for instance, and what a block of code is supposed to achieve.
Also, I see you use const
and let instead of
var`, which is inconsistent with the rest of the codebase. But it's alright, it's fine to use it in 2019 and slowly the codebase should evolve towards it. :)
lib/parser.js
Outdated
@@ -426,10 +435,24 @@ Parser.prototype._findBlockWithApiGetIndex = function(blocks) { | |||
found = false; | |||
break; | |||
} | |||
// if (filterTag && blocks[i][j].name.substr(0, 10) === filterTag && blocks[i][j].content !== valueTofilter) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove commented out code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
I used const and let but i change it to var to be consistent with the rest. |
lib/parser.js
Outdated
@@ -49,6 +50,12 @@ function Parser(_app) { | |||
self.addParser(parser, require(filename)); | |||
} | |||
}); | |||
|
|||
// check app.options.filterBy and define the tag to filer by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
lib/parser.js
Outdated
if (blocks[i][j].name.substr(0, 3) === 'api') | ||
found = true; | ||
} | ||
|
||
// add block if it's apidefine or the tag is equale to the value defined in options. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"equal" and no dot at the end please
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
lib/parser.js
Outdated
@@ -427,9 +438,26 @@ Parser.prototype._findBlockWithApiGetIndex = function(blocks) { | |||
break; | |||
} | |||
|
|||
// check if the user want to filter by some specifique tag |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"wants" and "specific" (are you french? :p)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hh yes :p
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
ok thanks I just need to test it and I'll merge! |
Super thanks :) |
Merged! Thanks again for your contribution. This repository is in need of contributors, so don't hesitate if you feel you can tackle other issues ;) ~Nico |
i will try thanks :) |
add possibility to filter documentation by tag and custom tag.
exemple: apidoc --filter-by apigroup=MyGroup