Show More
@@ -0,0 +1,33 b'' | |||||
|
1 | ======================= | |||
|
2 | CodeMirror in IPython | |||
|
3 | ======================= | |||
|
4 | ||||
|
5 | We carry a mostly unmodified copy of CodeMirror. The current version we use | |||
|
6 | is (*please update this information when updating versions*):: | |||
|
7 | ||||
|
8 | CodeMirror 2.15 | |||
|
9 | ||||
|
10 | The only changes we've applied so far are these:: | |||
|
11 | ||||
|
12 | diff --git a/IPython/frontend/html/notebook/static/codemirror/mode/python/python.js b/IPython/frontend/html/notebook/static/codemirror/mode/python/python.js | |||
|
13 | index ca94e7a..fc9a503 100644 | |||
|
14 | --- a/IPython/frontend/html/notebook/static/codemirror/mode/python/python.js | |||
|
15 | +++ b/IPython/frontend/html/notebook/static/codemirror/mode/python/python.js | |||
|
16 | @@ -5,7 +5,11 @@ CodeMirror.defineMode("python", function(conf, parserConf) { | |||
|
17 | return new RegExp("^((" + words.join(")|(") + "))\\b"); | |||
|
18 | } | |||
|
19 | ||||
|
20 | - var singleOperators = new RegExp("^[\\+\\-\\*/%&|\\^~<>!]"); | |||
|
21 | + // IPython-specific changes: add '?' as recognized character. | |||
|
22 | + //var singleOperators = new RegExp("^[\\+\\-\\*/%&|\\^~<>!]"); | |||
|
23 | + var singleOperators = new RegExp("^[\\+\\-\\*/%&|\\^~<>!\\?]"); | |||
|
24 | + // End IPython changes. | |||
|
25 | + | |||
|
26 | var singleDelimiters = new RegExp('^[\\(\\)\\[\\]\\{\\}@,:`=;\\.]'); | |||
|
27 | var doubleOperators = new RegExp("^((==)|(!=)|(<=)|(>=)|(<>)|(<<)|(>>)|(//)|(\\*\\*))"); | |||
|
28 | var doubleDelimiters = new RegExp("^((\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))"); | |||
|
29 | ||||
|
30 | ||||
|
31 | In practice it's just a one-line change, adding `\\?` to singleOperators, | |||
|
32 | surrounded by a comment. We'll turn this into a proper patchset if it ever | |||
|
33 | gets more complicated than this, but for now this note should be enough. |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now