Skip to content

Commit 5f93b65

Browse files
committed
[haskell mode] Make sure unfinished strings have token type string
To make closebrackets work with this mode Closes codemirror#4277
1 parent 1233299 commit 5f93b65

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mode/haskell/haskell.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ CodeMirror.defineMode("haskell", function(_config, modeConfig) {
5656
if (source.eat('\'')) {
5757
return "string";
5858
}
59-
return "error";
59+
return "string error";
6060
}
6161

6262
if (ch == '"') {
@@ -166,7 +166,7 @@ CodeMirror.defineMode("haskell", function(_config, modeConfig) {
166166
}
167167
}
168168
setState(normal);
169-
return "error";
169+
return "string error";
170170
}
171171

172172
function stringGap(source, setState) {
@@ -194,7 +194,7 @@ CodeMirror.defineMode("haskell", function(_config, modeConfig) {
194194
"module", "newtype", "of", "then", "type", "where", "_");
195195

196196
setType("keyword")(
197-
"\.\.", ":", "::", "=", "\\", "\"", "<-", "->", "@", "~", "=>");
197+
"\.\.", ":", "::", "=", "\\", "<-", "->", "@", "~", "=>");
198198

199199
setType("builtin")(
200200
"!!", "$!", "$", "&&", "+", "++", "-", ".", "/", "/=", "<", "<=", "=<<",

0 commit comments

Comments
 (0)