-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Mode updates #1236
Mode updates #1236
Conversation
You are replacing the regex for the shell comment to
I think that's also broken, because
isn't actually commented (so it would print |
@nightwing That doesn't work either, what about comments that start right at the beginning of the line (without a space)? Maybe... |
maybe |
@gjtorikian @nightwing what you really need here is a lookbehind. @nightwing The only downside is that it captures the whitespace character before the hash as well. @gjtorikian if you are willing to accept a more complicated solution, how about capturing
|
I don't see how |
To explain the difference:
Notice how that whitespace in front of When using lookaheads, you have to select for the part you want:
and use the capture (index 1). |
Ok, I got it and made the appropriate change/fix. |
Looks good! Merging. |
Fixes #1219
Fixes #1235