Skip to content
Snippets Groups Projects
Commit 9ca51f30 authored by Randy Burden's avatar Randy Burden Committed by Marijn Haverbeke
Browse files

[overlay mode demo] Fixed bug which highlighted the rest of the line

If "{{" was found, the code would highlight the rest of the line
regardless if a matching "}}" or "}}}" was found.
parent e1289d85
No related branches found
No related tags found
No related merge requests found
......@@ -46,9 +46,10 @@ CodeMirror.defineMode("mustache", function(config, parserConfig) {
var ch;
if (stream.match("{{")) {
while ((ch = stream.next()) != null)
if (ch == "}" && stream.next() == "}") break;
stream.eat("}");
return "mustache";
if (ch == "}" && stream.next() == "}") {
stream.eat("}");
return "mustache";
}
}
while (stream.next() != null && !stream.match("{{", false)) {}
return null;
......
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