Skip to content

Commit c6a935c

Browse files
Abdussalam Abdurrahmanmarijnh
authored andcommitted
[clojure mode] Minor refactoring.
1 parent 74d4200 commit c6a935c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mode/clojure/clojure.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ CodeMirror.defineMode("clojure", function (options) {
167167

168168
if (ch === "\\") {stream.next(); readSymbol(stream); return "string-2";}
169169
if (ch === '"') return (state.tokenize = inString)(stream, state);
170-
if (ch === "(" || ch === "[" || ch === "{") {tokenType = "open"; return "bracket";}
171-
if (ch === ")" || ch === "]" || ch === "}") {tokenType = "close"; return "bracket";}
170+
if (/[(\[{]/.test(ch)) {tokenType = "open"; return "bracket";}
171+
if (/[)\]}]/.test(ch)) {tokenType = "close"; return "bracket";}
172172
if (ch === ";") {stream.skipToEnd(); tokenType = "space"; return "comment";}
173173
if (/[#'@^`~]/.test(ch)) return "meta";
174174

0 commit comments

Comments
 (0)