##// END OF EJS Templates
Replacing a for-in loop by an index loop on an array, to avoid enumerating inherited properties
Sylvain Corlay -
Show More
@@ -313,9 +313,9 b' var IPython = (function (IPython) {'
313 for( var mode in modes) {
313 for( var mode in modes) {
314 var regs = modes[mode]['reg'];
314 var regs = modes[mode]['reg'];
315 // only one key every time but regexp can't be keys...
315 // only one key every time but regexp can't be keys...
316 for(var reg in regs ) {
316 for(var i=0; i<regs.length; i++) {
317 // here we handle non magic_modes
317 // here we handle non magic_modes
318 if(first_line.match(regs[reg]) != null) {
318 if(first_line.match(regs[i]) != null) {
319 if(current_mode == mode){
319 if(current_mode == mode){
320 return;
320 return;
321 }
321 }
General Comments 0
You need to be logged in to leave comments. Login now