-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optionally override the default comment regex #8
Conversation
This sounds dangerous as hell. The regular expression has to return the same How about adding an option to specifiy the line comment instead of overwriting the whole regex? So say like |
@FWeinb that is a fair call :) I've updated so you only set |
@@ -62,7 +83,7 @@ var CommentExtractor = (function () { | |||
|
|||
var cleanLineComments = function (comment) { | |||
var type; | |||
var lines = comment.split(/[\/]{3,}/); | |||
var lines = comment.split(/[\/]{2,}/); |
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.
This should be equal to the string passed as the lineCommentStyle
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.
I see - thanks for the tip :) I've updated to use the lineCommentStyle
.
This is awesome! Really appreciate your work here, add yourself to the |
…he line comment style when cleaning line matches
Thanks! |
Great work! Will merge |
Optionally override the default comment regex
Released in |
Hi, what do you think about this? I'd like to be able to support different types of comments (eg.
//
instead of///
). Everything should still be backwards compatible until you opt-in to the custom format.