-
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
Allow restricting "lineCommentStyle" match to the beginning of a line. #16
Comments
I submitted a PR (#17) which addresses this without breaking other use-cases. If two or more instances of |
Hi, it feels reasonable to only allow one doc comment per line, at least in the SassDoc context. As for this PR I hope @FWeinb will be able to have a look at it. |
Sorry for not responding earlier. I added @pascalduez as a maintainer to cdocparser. I would be glad if you could merge the PR. |
@pascalduez Anything holding up merging the PR, etc? Thanks! |
@FWeinb Do I have publish rights on npm as well? ;) |
@pascalduez Sorry for that. Just added you. |
@jgerigmeyer I will need to run some tests before bumping the dependency in |
@pascalduez What breakages are you seeing? There's a failed build on that PR merge (https://travis-ci.org/SassDoc/sassdoc/builds/90808006), but it looks like it's a simple linting error. Is there something else I'm missing? |
@jgerigmeyer That branch was never merged into master, and I don't want to rush releasing this, it would need proper docs etc. |
@pascalduez That makes sense... though I'll point out that since scss-comment-parser is requiring |
@jgerigmeyer I though |
@pascalduez Oh, you're correct. My mistake! (I've been using |
As its written now, any occurrence of the
lineCommentStyle
will be matched and stripped from the parsed return value. This makes it impossible to "comment a comment", or use thelineCommentStyle
string within a comment. For example, using SassDoc, it would be nice to be able to have the comment syntax within a comment (to show how to make a comment):Right now, the regex matches every occurrence of
///
, resulting inlines
:Instead of what I'd like:
One "fix" would be enforcing that comments must begin with a newline by changing the regex in
index.js#L80
from:to:
I'm not sure if that would break other use-cases (it doesn't break anything else in my SassDoc project, at least)... Perhaps it could be an option turned on or off?
Or even better, is there a way to mark a section of text as "escaped" such that it won't be stripped by CDocParser, or enforce only one comment per line?
The text was updated successfully, but these errors were encountered: