Skip to content

Commit

Permalink
Fix visualization error with "\#"
Browse files Browse the repository at this point in the history
Close #202

Signed-off-by: Kenji Okimoto <[email protected]>
  • Loading branch information
okkez committed Aug 21, 2018
1 parent 3e11fd7 commit 533651c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion app/javascript/packs/codemirror.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,15 @@ CodeMirror.defineMode("fluentd", function() {
state.context = "inner-definition-keyword-appeared";
return "variable";
case "inner-definition-keyword-appeared":
stream.eatWhile(/[^#]/);
let eatBuiltin = function(stream, state) {
stream.eatWhile(/[^#]/);
if (stream.current().match(/\\$/)) {
stream.next() && eatBuiltin(stream, state);
} else {
return;
}
};
eat(stream, state);
state.context = "inner-definition";
return "builtin";
default:
Expand Down

0 comments on commit 533651c

Please sign in to comment.