##// END OF EJS Templates
patch SingleOperator in CodeMirror2
Matthias BUSSONNIER -
Show More
@@ -5,7 +5,10 CodeMirror.defineMode("python", function(conf, parserConf) {
5 5 return new RegExp("^((" + words.join(")|(") + "))\\b");
6 6 }
7 7
8 var singleOperators = new RegExp("^[\\+\\-\\*/%&|\\^~<>!]");
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