##// END OF EJS Templates
Do not use version # in codemirror directory name....
Fernando Perez -
Show More
1 NO CONTENT: new file 100644
NO CONTENT: new file 100644
1 NO CONTENT: file renamed from IPython/frontend/html/notebook/static/codemirror-2.12/LICENSE to IPython/frontend/html/notebook/static/codemirror/LICENSE
NO CONTENT: file renamed from IPython/frontend/html/notebook/static/codemirror-2.12/LICENSE to IPython/frontend/html/notebook/static/codemirror/LICENSE
1 NO CONTENT: file renamed from IPython/frontend/html/notebook/static/codemirror-2.12/README.md to IPython/frontend/html/notebook/static/codemirror/README.md
NO CONTENT: file renamed from IPython/frontend/html/notebook/static/codemirror-2.12/README.md to IPython/frontend/html/notebook/static/codemirror/README.md
1 NO CONTENT: file renamed from IPython/frontend/html/notebook/static/codemirror-2.12/lib/codemirror.css to IPython/frontend/html/notebook/static/codemirror/lib/codemirror.css
NO CONTENT: file renamed from IPython/frontend/html/notebook/static/codemirror-2.12/lib/codemirror.css to IPython/frontend/html/notebook/static/codemirror/lib/codemirror.css
@@ -103,8 +103,8 b' var CodeMirror = (function() {'
103 connect(scroller, "paste", function(){focusInput(); fastPoll();});
103 connect(scroller, "paste", function(){focusInput(); fastPoll();});
104 connect(input, "paste", function(){fastPoll();});
104 connect(input, "paste", function(){fastPoll();});
105 connect(input, "cut", function(){fastPoll();});
105 connect(input, "cut", function(){fastPoll();});
106
106
107 // IE throws unspecified error in certain cases, when
107 // IE throws unspecified error in certain cases, when
108 // trying to access activeElement before onload
108 // trying to access activeElement before onload
109 var hasFocus; try { hasFocus = (targetDocument.activeElement == input); } catch(e) { }
109 var hasFocus; try { hasFocus = (targetDocument.activeElement == input); } catch(e) { }
110 if (hasFocus) setTimeout(onFocus, 20);
110 if (hasFocus) setTimeout(onFocus, 20);
@@ -248,7 +248,7 b' var CodeMirror = (function() {'
248 }
248 }
249
249
250 var start = posFromMouse(e);
250 var start = posFromMouse(e);
251
251
252 switch (e_button(e)) {
252 switch (e_button(e)) {
253 case 3:
253 case 3:
254 if (gecko && !mac) onContextMenu(e);
254 if (gecko && !mac) onContextMenu(e);
@@ -1255,7 +1255,7 b' var CodeMirror = (function() {'
1255 prepareInput();
1255 prepareInput();
1256 slowPoll();
1256 slowPoll();
1257 }
1257 }
1258
1258
1259 if (gecko) {
1259 if (gecko) {
1260 e_stop(e);
1260 e_stop(e);
1261 var mouseup = connect(window, "mouseup", function() {
1261 var mouseup = connect(window, "mouseup", function() {
@@ -42,7 +42,7 b' CodeMirror.overlayParser = function(base, overlay, combine) {'
42 if (state.baseCur != null && combine) return state.baseCur + " " + state.overlayCur;
42 if (state.baseCur != null && combine) return state.baseCur + " " + state.overlayCur;
43 else return state.overlayCur;
43 else return state.overlayCur;
44 },
44 },
45
45
46 indent: function(state, textAfter) {
46 indent: function(state, textAfter) {
47 return base.indent(state.base, textAfter);
47 return base.indent(state.base, textAfter);
48 },
48 },
1 NO CONTENT: file renamed from IPython/frontend/html/notebook/static/codemirror-2.12/lib/runmode.js to IPython/frontend/html/notebook/static/codemirror/lib/runmode.js
NO CONTENT: file renamed from IPython/frontend/html/notebook/static/codemirror-2.12/lib/runmode.js to IPython/frontend/html/notebook/static/codemirror/lib/runmode.js
1 NO CONTENT: file renamed from IPython/frontend/html/notebook/static/codemirror-2.12/mode/css/css.js to IPython/frontend/html/notebook/static/codemirror/mode/css/css.js
NO CONTENT: file renamed from IPython/frontend/html/notebook/static/codemirror-2.12/mode/css/css.js to IPython/frontend/html/notebook/static/codemirror/mode/css/css.js
1 NO CONTENT: file renamed from IPython/frontend/html/notebook/static/codemirror-2.12/mode/css/index.html to IPython/frontend/html/notebook/static/codemirror/mode/css/index.html
NO CONTENT: file renamed from IPython/frontend/html/notebook/static/codemirror-2.12/mode/css/index.html to IPython/frontend/html/notebook/static/codemirror/mode/css/index.html
1 NO CONTENT: file renamed from IPython/frontend/html/notebook/static/codemirror-2.12/mode/htmlmixed/htmlmixed.js to IPython/frontend/html/notebook/static/codemirror/mode/htmlmixed/htmlmixed.js
NO CONTENT: file renamed from IPython/frontend/html/notebook/static/codemirror-2.12/mode/htmlmixed/htmlmixed.js to IPython/frontend/html/notebook/static/codemirror/mode/htmlmixed/htmlmixed.js
1 NO CONTENT: file renamed from IPython/frontend/html/notebook/static/codemirror-2.12/mode/htmlmixed/index.html to IPython/frontend/html/notebook/static/codemirror/mode/htmlmixed/index.html
NO CONTENT: file renamed from IPython/frontend/html/notebook/static/codemirror-2.12/mode/htmlmixed/index.html to IPython/frontend/html/notebook/static/codemirror/mode/htmlmixed/index.html
1 NO CONTENT: file renamed from IPython/frontend/html/notebook/static/codemirror-2.12/mode/javascript/index.html to IPython/frontend/html/notebook/static/codemirror/mode/javascript/index.html
NO CONTENT: file renamed from IPython/frontend/html/notebook/static/codemirror-2.12/mode/javascript/index.html to IPython/frontend/html/notebook/static/codemirror/mode/javascript/index.html
@@ -52,7 +52,7 b' CodeMirror.defineMode("javascript", function(config, parserConfig) {'
52 else if (ch == "0" && stream.eat(/x/i)) {
52 else if (ch == "0" && stream.eat(/x/i)) {
53 stream.eatWhile(/[\da-f]/i);
53 stream.eatWhile(/[\da-f]/i);
54 return ret("number", "number");
54 return ret("number", "number");
55 }
55 }
56 else if (/\d/.test(ch)) {
56 else if (/\d/.test(ch)) {
57 stream.match(/^\d*(?:\.\d*)?(?:e[+\-]?\d+)?/);
57 stream.match(/^\d*(?:\.\d*)?(?:e[+\-]?\d+)?/);
58 return ret("number", "number");
58 return ret("number", "number");
@@ -134,7 +134,7 b' CodeMirror.defineMode("javascript", function(config, parserConfig) {'
134 // Communicate our context to the combinators.
134 // Communicate our context to the combinators.
135 // (Less wasteful than consing up a hundred closures on every call.)
135 // (Less wasteful than consing up a hundred closures on every call.)
136 cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc;
136 cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc;
137
137
138 if (!state.lexical.hasOwnProperty("align"))
138 if (!state.lexical.hasOwnProperty("align"))
139 state.lexical.align = true;
139 state.lexical.align = true;
140
140
1 NO CONTENT: file renamed from IPython/frontend/html/notebook/static/codemirror-2.12/mode/markdown/index.html to IPython/frontend/html/notebook/static/codemirror/mode/markdown/index.html
NO CONTENT: file renamed from IPython/frontend/html/notebook/static/codemirror-2.12/mode/markdown/index.html to IPython/frontend/html/notebook/static/codemirror/mode/markdown/index.html
1 NO CONTENT: file renamed from IPython/frontend/html/notebook/static/codemirror-2.12/mode/markdown/markdown.css to IPython/frontend/html/notebook/static/codemirror/mode/markdown/markdown.css
NO CONTENT: file renamed from IPython/frontend/html/notebook/static/codemirror-2.12/mode/markdown/markdown.css to IPython/frontend/html/notebook/static/codemirror/mode/markdown/markdown.css
1 NO CONTENT: file renamed from IPython/frontend/html/notebook/static/codemirror-2.12/mode/markdown/markdown.js to IPython/frontend/html/notebook/static/codemirror/mode/markdown/markdown.js
NO CONTENT: file renamed from IPython/frontend/html/notebook/static/codemirror-2.12/mode/markdown/markdown.js to IPython/frontend/html/notebook/static/codemirror/mode/markdown/markdown.js
1 NO CONTENT: file renamed from IPython/frontend/html/notebook/static/codemirror-2.12/mode/python/LICENSE.txt to IPython/frontend/html/notebook/static/codemirror/mode/python/LICENSE.txt
NO CONTENT: file renamed from IPython/frontend/html/notebook/static/codemirror-2.12/mode/python/LICENSE.txt to IPython/frontend/html/notebook/static/codemirror/mode/python/LICENSE.txt
@@ -11,7 +11,7 b''
11 </head>
11 </head>
12 <body>
12 <body>
13 <h1>CodeMirror 2: Python mode</h1>
13 <h1>CodeMirror 2: Python mode</h1>
14
14
15 <div><textarea id="code" name="code">
15 <div><textarea id="code" name="code">
16 # Literals
16 # Literals
17 1234
17 1234
@@ -1,10 +1,10 b''
1 CodeMirror.defineMode("python", function(conf, parserConf) {
1 CodeMirror.defineMode("python", function(conf, parserConf) {
2 var ERRORCLASS = 'error';
2 var ERRORCLASS = 'error';
3
3
4 function wordRegexp(words) {
4 function wordRegexp(words) {
5 return new RegExp("^((" + words.join(")|(") + "))\\b");
5 return new RegExp("^((" + words.join(")|(") + "))\\b");
6 }
6 }
7
7
8 var singleOperators = new RegExp("^[\\+\\-\\*/%&|\\^~<>!]");
8 var singleOperators = new RegExp("^[\\+\\-\\*/%&|\\^~<>!]");
9 var singleDelimiters = new RegExp('^[\\(\\)\\[\\]\\{\\}@,:`=;\\.]');
9 var singleDelimiters = new RegExp('^[\\(\\)\\[\\]\\{\\}@,:`=;\\.]');
10 var doubleOperators = new RegExp("^((==)|(!=)|(<=)|(>=)|(<>)|(<<)|(>>)|(//)|(\\*\\*))");
10 var doubleOperators = new RegExp("^((==)|(!=)|(<=)|(>=)|(<>)|(<<)|(>>)|(//)|(\\*\\*))");
@@ -65,15 +65,15 b' CodeMirror.defineMode("python", function(conf, parserConf) {'
65 if (stream.eatSpace()) {
65 if (stream.eatSpace()) {
66 return null;
66 return null;
67 }
67 }
68
68
69 var ch = stream.peek();
69 var ch = stream.peek();
70
70
71 // Handle Comments
71 // Handle Comments
72 if (ch === '#') {
72 if (ch === '#') {
73 stream.skipToEnd();
73 stream.skipToEnd();
74 return 'comment';
74 return 'comment';
75 }
75 }
76
76
77 // Handle Number Literals
77 // Handle Number Literals
78 if (stream.match(/^[0-9\.]/, false)) {
78 if (stream.match(/^[0-9\.]/, false)) {
79 var floatLiteral = false;
79 var floatLiteral = false;
@@ -109,13 +109,13 b' CodeMirror.defineMode("python", function(conf, parserConf) {'
109 return 'number';
109 return 'number';
110 }
110 }
111 }
111 }
112
112
113 // Handle Strings
113 // Handle Strings
114 if (stream.match(stringPrefixes)) {
114 if (stream.match(stringPrefixes)) {
115 state.tokenize = tokenStringFactory(stream.current());
115 state.tokenize = tokenStringFactory(stream.current());
116 return state.tokenize(stream, state);
116 return state.tokenize(stream, state);
117 }
117 }
118
118
119 // Handle operators and Delimiters
119 // Handle operators and Delimiters
120 if (stream.match(tripleDelimiters) || stream.match(doubleDelimiters)) {
120 if (stream.match(tripleDelimiters) || stream.match(doubleDelimiters)) {
121 return null;
121 return null;
@@ -128,31 +128,31 b' CodeMirror.defineMode("python", function(conf, parserConf) {'
128 if (stream.match(singleDelimiters)) {
128 if (stream.match(singleDelimiters)) {
129 return null;
129 return null;
130 }
130 }
131
131
132 if (stream.match(types)) {
132 if (stream.match(types)) {
133 return 'builtin';
133 return 'builtin';
134 }
134 }
135
135
136 if (stream.match(keywords)) {
136 if (stream.match(keywords)) {
137 return 'keyword';
137 return 'keyword';
138 }
138 }
139
139
140 if (stream.match(identifiers)) {
140 if (stream.match(identifiers)) {
141 return 'variable';
141 return 'variable';
142 }
142 }
143
143
144 // Handle non-detected items
144 // Handle non-detected items
145 stream.next();
145 stream.next();
146 return ERRORCLASS;
146 return ERRORCLASS;
147 }
147 }
148
148
149 function tokenStringFactory(delimiter) {
149 function tokenStringFactory(delimiter) {
150 while ('rub'.indexOf(delimiter.charAt(0).toLowerCase()) >= 0) {
150 while ('rub'.indexOf(delimiter.charAt(0).toLowerCase()) >= 0) {
151 delimiter = delimiter.substr(1);
151 delimiter = delimiter.substr(1);
152 }
152 }
153 var singleline = delimiter.length == 1;
153 var singleline = delimiter.length == 1;
154 var OUTCLASS = 'string';
154 var OUTCLASS = 'string';
155
155
156 return function tokenString(stream, state) {
156 return function tokenString(stream, state) {
157 while (!stream.eol()) {
157 while (!stream.eol()) {
158 stream.eatWhile(/[^'"\\]/);
158 stream.eatWhile(/[^'"\\]/);
@@ -178,7 +178,7 b' CodeMirror.defineMode("python", function(conf, parserConf) {'
178 return OUTCLASS;
178 return OUTCLASS;
179 };
179 };
180 }
180 }
181
181
182 function indent(stream, state, type) {
182 function indent(stream, state, type) {
183 type = type || 'py';
183 type = type || 'py';
184 var indentUnit = 0;
184 var indentUnit = 0;
@@ -197,7 +197,7 b' CodeMirror.defineMode("python", function(conf, parserConf) {'
197 type: type
197 type: type
198 });
198 });
199 }
199 }
200
200
201 function dedent(stream, state) {
201 function dedent(stream, state) {
202 if (state.scopes.length == 1) return;
202 if (state.scopes.length == 1) return;
203 if (state.scopes[0].type === 'py') {
203 if (state.scopes[0].type === 'py') {
@@ -237,7 +237,7 b' CodeMirror.defineMode("python", function(conf, parserConf) {'
237 return ERRORCLASS;
237 return ERRORCLASS;
238 }
238 }
239 }
239 }
240
240
241 // Handle decorators
241 // Handle decorators
242 if (current === '@') {
242 if (current === '@') {
243 style = state.tokenize(stream, state);
243 style = state.tokenize(stream, state);
@@ -250,7 +250,7 b' CodeMirror.defineMode("python", function(conf, parserConf) {'
250 return ERRORCLASS;
250 return ERRORCLASS;
251 }
251 }
252 }
252 }
253
253
254 // Handle scope changes.
254 // Handle scope changes.
255 if (current === 'pass' || current === 'return') {
255 if (current === 'pass' || current === 'return') {
256 state.dedent += 1;
256 state.dedent += 1;
@@ -278,7 +278,7 b' CodeMirror.defineMode("python", function(conf, parserConf) {'
278 if (state.scopes.length > 1) state.scopes.shift();
278 if (state.scopes.length > 1) state.scopes.shift();
279 state.dedent -= 1;
279 state.dedent -= 1;
280 }
280 }
281
281
282 return style;
282 return style;
283 }
283 }
284
284
@@ -292,27 +292,27 b' CodeMirror.defineMode("python", function(conf, parserConf) {'
292 dedent: 0
292 dedent: 0
293 };
293 };
294 },
294 },
295
295
296 token: function(stream, state) {
296 token: function(stream, state) {
297 var style = tokenLexer(stream, state);
297 var style = tokenLexer(stream, state);
298
298
299 state.lastToken = {style:style, content: stream.current()};
299 state.lastToken = {style:style, content: stream.current()};
300
300
301 if (stream.eol() && stream.lambda) {
301 if (stream.eol() && stream.lambda) {
302 state.lambda = false;
302 state.lambda = false;
303 }
303 }
304
304
305 return style;
305 return style;
306 },
306 },
307
307
308 indent: function(state, textAfter) {
308 indent: function(state, textAfter) {
309 if (state.tokenize != tokenBase) {
309 if (state.tokenize != tokenBase) {
310 return 0;
310 return 0;
311 }
311 }
312
312
313 return state.scopes[0].offset;
313 return state.scopes[0].offset;
314 }
314 }
315
315
316 };
316 };
317 return external;
317 return external;
318 });
318 });
@@ -523,4 +523,3 b' There are some problems one commonly runs into while authoring reST documents:'
523 <p><strong>MIME types defined:</strong> <code>text/x-rst</code>.</p>
523 <p><strong>MIME types defined:</strong> <code>text/x-rst</code>.</p>
524 </body>
524 </body>
525 </html>
525 </html>
526
1 NO CONTENT: file renamed from IPython/frontend/html/notebook/static/codemirror-2.12/mode/rst/rst.css to IPython/frontend/html/notebook/static/codemirror/mode/rst/rst.css
NO CONTENT: file renamed from IPython/frontend/html/notebook/static/codemirror-2.12/mode/rst/rst.css to IPython/frontend/html/notebook/static/codemirror/mode/rst/rst.css
1 NO CONTENT: file renamed from IPython/frontend/html/notebook/static/codemirror-2.12/mode/rst/rst.js to IPython/frontend/html/notebook/static/codemirror/mode/rst/rst.js
NO CONTENT: file renamed from IPython/frontend/html/notebook/static/codemirror-2.12/mode/rst/rst.js to IPython/frontend/html/notebook/static/codemirror/mode/rst/rst.js
1 NO CONTENT: file renamed from IPython/frontend/html/notebook/static/codemirror-2.12/mode/xml/index.html to IPython/frontend/html/notebook/static/codemirror/mode/xml/index.html
NO CONTENT: file renamed from IPython/frontend/html/notebook/static/codemirror-2.12/mode/xml/index.html to IPython/frontend/html/notebook/static/codemirror/mode/xml/index.html
1 NO CONTENT: file renamed from IPython/frontend/html/notebook/static/codemirror-2.12/mode/xml/xml.js to IPython/frontend/html/notebook/static/codemirror/mode/xml/xml.js
NO CONTENT: file renamed from IPython/frontend/html/notebook/static/codemirror-2.12/mode/xml/xml.js to IPython/frontend/html/notebook/static/codemirror/mode/xml/xml.js
1 NO CONTENT: file renamed from IPython/frontend/html/notebook/static/codemirror-2.12/theme/default.css to IPython/frontend/html/notebook/static/codemirror/theme/default.css
NO CONTENT: file renamed from IPython/frontend/html/notebook/static/codemirror-2.12/theme/default.css to IPython/frontend/html/notebook/static/codemirror/theme/default.css
1 NO CONTENT: file renamed from IPython/frontend/html/notebook/static/codemirror-2.12/theme/elegant.css to IPython/frontend/html/notebook/static/codemirror/theme/elegant.css
NO CONTENT: file renamed from IPython/frontend/html/notebook/static/codemirror-2.12/theme/elegant.css to IPython/frontend/html/notebook/static/codemirror/theme/elegant.css
@@ -38,4 +38,3 b''
38 /*span.py-bytes {color: #BA2121;}*/
38 /*span.py-bytes {color: #BA2121;}*/
39 /*span.py-raw {color: #BA2121;}*/
39 /*span.py-raw {color: #BA2121;}*/
40 /*span.py-unicode {color: #BA2121;}*/
40 /*span.py-unicode {color: #BA2121;}*/
41
1 NO CONTENT: file renamed from IPython/frontend/html/notebook/static/codemirror-2.12/theme/neat.css to IPython/frontend/html/notebook/static/codemirror/theme/neat.css
NO CONTENT: file renamed from IPython/frontend/html/notebook/static/codemirror-2.12/theme/neat.css to IPython/frontend/html/notebook/static/codemirror/theme/neat.css
1 NO CONTENT: file renamed from IPython/frontend/html/notebook/static/codemirror-2.12/theme/night.css to IPython/frontend/html/notebook/static/codemirror/theme/night.css
NO CONTENT: file renamed from IPython/frontend/html/notebook/static/codemirror-2.12/theme/night.css to IPython/frontend/html/notebook/static/codemirror/theme/night.css
General Comments 0
You need to be logged in to leave comments. Login now