Skip to content

Commit 6977470

Browse files
committed
[erlang mode] Fix bug introduced by previous patch
1 parent 74832f9 commit 6977470

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mode/erlang/erlang.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,8 @@ CodeMirror.defineMode("erlang", function(cmCfg) {
339339
}
340340

341341
function lookahead(stream) {
342-
return !stream.eol() ? m.pop() : "";
342+
let m = stream.match(/^\s*([^\s%])/, false)
343+
return m ? m[1] : "";
343344
}
344345

345346
function is_member(element,list) {

0 commit comments

Comments
 (0)