From dc58da07afaf5e60af75e26751474b52f9848f83 Mon Sep 17 00:00:00 2001 From: andri lim Date: Mon, 16 Jul 2018 23:43:50 +0700 Subject: [PATCH] fixes #432, Nim's syntax highlighting is not weird anymore (#433) --- lib/custom/modes/nimrod.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/custom/modes/nimrod.js b/lib/custom/modes/nimrod.js index 95ec81c..327d840 100755 --- a/lib/custom/modes/nimrod.js +++ b/lib/custom/modes/nimrod.js @@ -8,7 +8,9 @@ CodeMirror.defineMode('nimrod', function(conf, parserConf) { return new RegExp('^((' + words.join(')|(') + '))\\b') } - var operators = new RegExp('\\=\\+\\-\\*\\/\\<\\>\\@\\$\\~\\&\\%\\|\\!\\?\\^\\:\\\\') + var ops = ['=', '+', '-', '*', '/', '<', '>', '@', '$', '~', '&', '%', '|', + '?', '^', ':', '\\', '[', ']', '(', ')', ',', '{', '}', '.\\.', '.'] + var operators = new RegExp(ops.map(function(op) { return '\\' + op; }).join('|')) var identifiers = new RegExp('^[_A-Za-z][_A-Za-z0-9]*') var commonkeywords = [