Fixed single-line comment detection not recognizing line breaks as the end of the comment#79
Fixed single-line comment detection not recognizing line breaks as the end of the comment#79frnsys wants to merge 3 commits into
Conversation
|
I actually like this behavior but don't feel too strong about it. If you can gather some support for your pull I'll merge it. Otherwise I'll accept a pull if you make it so when you press a single backspace it removes the comments. |
|
I might be misunderstanding how that was meant to be used, is there a reason that the new lines aren't recognized as the end of the comment? |
|
Many instances, but it all boils down to: when writing multiline comments without having to use /**/ |
|
But those line's wouldn't be interpreted as comments by the interpreter, would they? Thanks! |
|
Just to clarify: @goatslacker I think you might be thinking is that in the snippet function foo(x, y) {
// This is a comment|<- the cursor
return x + y;
}when the cursor is at the end of the comment and you hit Enter, you could arguably want the result to be: function foo(x, y) {
// This is a comment
// |<- the cursor
return x + y;
}I believe @Ftzeng is not arguing against that behavior. I believe the bug @Ftzeng is reporting is that the line @Ftzeng: I am unable to reproduce this bug on the latest My vote is to close this issue. |
|
That's exactly the issue I was having. I will try again with the latest commit. Yeah the additional commits are unrelated, I was just messing around with some things. |
I was having an issue where comment highlighting was being applied to lines following single line comments.
For example:
Everything under the comment would be interpreted as a comment as well.
I just removed
\nfrom theskipregex pattern forjsLineComment, and that fixed things.