mirror of
https://github.com/jupyter/notebook.git
synced 2025-03-13 13:17:50 +08:00
Replacing a for-in loop by an index loop on an array, to avoid enumerating inherited properties
This commit is contained in:
parent
c0f346c4e3
commit
a053ba2419
@ -313,9 +313,9 @@ var IPython = (function (IPython) {
|
||||
for( var mode in modes) {
|
||||
var regs = modes[mode]['reg'];
|
||||
// only one key every time but regexp can't be keys...
|
||||
for(var reg in regs ) {
|
||||
for(var i=0; i<regs.length; i++) {
|
||||
// here we handle non magic_modes
|
||||
if(first_line.match(regs[reg]) != null) {
|
||||
if(first_line.match(regs[i]) != null) {
|
||||
if(current_mode == mode){
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user