##// END OF EJS Templates
patch SingleOperator in CodeMirror2
Matthias BUSSONNIER -
Show More
@@ -4,8 +4,11 b' CodeMirror.defineMode("python", function(conf, parserConf) {'
4 4 function wordRegexp(words) {
5 5 return new RegExp("^((" + words.join(")|(") + "))\\b");
6 6 }
7
8 var singleOperators = new RegExp("^[\\+\\-\\*/%&|\\^~<>!]");
7
8 // IPython-specific changes: add '?' as recognized character.
9 var singleOperators = new RegExp("^[\\+\\-\\*/%&|\\^~<>!\\?]");
10 // End IPython changes.
11
9 12 var singleDelimiters = new RegExp('^[\\(\\)\\[\\]\\{\\}@,:`=;\\.]');
10 13 var doubleOperators = new RegExp("^((==)|(!=)|(<=)|(>=)|(<>)|(<<)|(>>)|(//)|(\\*\\*))");
11 14 var doubleDelimiters = new RegExp("^((\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))");
General Comments 0
You need to be logged in to leave comments. Login now