Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a pull-request for issue #1.
I've added an options parameter to the extract-function. This parameter is an object that can have a
filename
-property. If no filename is set,abc.js
will be assumed to cover backwards compatibility.I've used the
comment-patterns
module to determine the comment-patterns for the programming language determined by the filename.Tests are green, including my new test-case for a Handlebars-file, and I have included a small example in the
.verb.md
template (but not in the README).I have not tested any other languages than JavaScript and Handlebars.
I have not grasped
Extracting from files
-example in the readme yet. Otherwise I would have adapted it as well.Finally, I guess having three commits for this issue is not nice as well, so if you comment on my commits, I will combine these three with additional changes to be made and resubmit a pull-request containing just one commit.
Also I would publish
comment-patterns
as version 1.0.0.It would be nice if you had a look.