Skip to content
Snippets Groups Projects
Commit 3ac216b6 authored by Marijn Haverbeke's avatar Marijn Haverbeke
Browse files

[comment addon] Remove misguided test

Closes #4148
parent 6b307573
No related branches found
No related tags found
No related merge requests found
......@@ -140,7 +140,7 @@
var line = self.getLine(i);
var found = line.indexOf(lineString);
if (found > -1 && !/comment/.test(self.getTokenTypeAt(Pos(i, found + 1)))) found = -1;
if (found == -1 && (i != end || i == start) && nonWS.test(line)) break lineComment;
if (found == -1 && nonWS.test(line)) break lineComment;
if (found > -1 && nonWS.test(line.slice(0, found))) break lineComment;
lines.push(line);
}
......
......@@ -97,4 +97,9 @@ namespace = "comment_";
test("dontMessWithStrings3", "javascript", function(cm) {
cm.execCommand("toggleComment");
}, "// console.log(\"// string\");", "console.log(\"// string\");");
test("includeLastLine", "javascript", function(cm) {
cm.execCommand("selectAll")
cm.execCommand("toggleComment")
}, "// foo\n// bar\nbaz", "// // foo\n// // bar\n// baz")
})();
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment