Skip to content

Commit 9a88838

Browse files
committed
[tcl mode] More liberally recognize comments
Closes codemirror#3853
1 parent 6c2d9b5 commit 9a88838

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

mode/tcl/tcl.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ CodeMirror.defineMode("tcl", function() {
5151
} else if (/\d/.test(ch)) {
5252
stream.eatWhile(/[\w\.]/);
5353
return "number";
54-
} else if (ch == "#" && stream.eat("*")) {
55-
return chain(stream, state, tokenComment);
56-
} else if (ch == "#" && stream.match(/ *\[ *\[/)) {
57-
return chain(stream, state, tokenUnparsed);
58-
} else if (ch == "#" && stream.eat("#")) {
54+
} else if (ch == "#") {
55+
if (stream.eat("*"))
56+
return chain(stream, state, tokenComment);
57+
if (ch == "#" && stream.match(/ *\[ *\[/))
58+
return chain(stream, state, tokenUnparsed);
5959
stream.skipToEnd();
6060
return "comment";
6161
} else if (ch == '"') {

0 commit comments

Comments
 (0)