-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
detect style prefix in dev comments #133
Comments
@drahnr I'm interested in taking this on, do you have any thoughts on the best way to implement it? |
He @pjsier , that's great! There is already some prefix parsing happening for My suggestion would be to take it from there, and detect if the span contains above pattern, and if so, split it into multiple spans. I'd be happy to mentor you through this, preferably via a draft PR :) |
Thanks! I took a look into the code based on your advice and I'm working on getting something up for a draft PR but running into some issues. The initial parsing in cargo-spellcheck/src/documentation/developer.rs Lines 287 to 301 in bfbe761
Where I'm running into issues is in cargo-spellcheck/src/documentation/literal.rs Lines 656 to 667 in bfbe761
The main issue I'm running into is that block comment variants support prefixes and always end with the suffix Do you have any thoughts on the best way to handle that, or am I missing something in the implementation? Thanks again! |
Note that there are currently two parsing approaches - one for dev in Mid term only
This is correct. I think the best approach might be, to split
I'd suggest to focus either on dev comments or on doc comments first (I recommend doc comments though, it's the harder problem and more people will benefit from that, since dev comment checks are disabled by default). Either way should be fine though :) Let me know if this makes sense to you or I should elaborate on anything further :) |
This makes sense, thanks so much for clarifying! |
Gentle ping |
Sorry for the delay! I don't think I'll be able to wrap this up, so feel free to assign it to someone else, thanks for all of your help! |
Alright, thanks for your work so far, I'll take it from here :) |
Is your feature request related to a particular use-case?
The dev comment feature is part of master now.
Currently the asterisk of
in line 2 is part of the reflown components.
Describe the solution you'd like to implement/see implemented
Detecting differently styled
/* ... */
comments and stripping leading\s\*\s
(regex notation) items and inserting.Describe alternatives you've considered
Disallow dev comments for reflow operations.
Additional context
Ref #115
The text was updated successfully, but these errors were encountered: