##// END OF EJS Templates
cleanup whitespace
Matthias Bussonnier -
Show More
@@ -543,26 +543,26 define([
543 }
543 }
544 var open = modes[mode].open || "%%";
544 var open = modes[mode].open || "%%";
545 var close = modes[mode].close || "%%end";
545 var close = modes[mode].close || "%%end";
546 var mmode = mode;
546 var magic_mode = mode;
547 mode = mmode.substr(6);
547 mode = magic_mode.substr(6);
548 if(current_mode == mmode){
548 if(current_mode == magic_mode){
549 return;
549 return;
550 }
550 }
551 utils.requireCodeMirrorMode(mode, function () {
551 utils.requireCodeMirrorMode(mode, function () {
552 // create on the fly a mode that switch between
552 // create on the fly a mode that switch between
553 // plain/text and something else, otherwise `%%` is
553 // plain/text and something else, otherwise `%%` is
554 // source of some highlight issues.
554 // source of some highlight issues.
555 CodeMirror.defineMode(mmode, function(config) {
555 CodeMirror.defineMode(magic_mode, function(config) {
556 return CodeMirror.multiplexingMode(
556 return CodeMirror.multiplexingMode(
557 CodeMirror.getMode(config, 'text/plain'),
557 CodeMirror.getMode(config, 'text/plain'),
558 // always set someting on close
558 // always set something on close
559 {open: open, close: close,
559 {open: open, close: close,
560 mode: CodeMirror.getMode(config, mode),
560 mode: CodeMirror.getMode(config, mode),
561 delimStyle: "delimit"
561 delimStyle: "delimit"
562 }
562 }
563 );
563 );
564 });
564 });
565 that.code_mirror.setOption('mode', mmode);
565 that.code_mirror.setOption('mode', magic_mode);
566 });
566 });
567 return;
567 return;
568 }
568 }
@@ -36,4 +36,3
36
36
37 CodeMirror.defineMIME("text/x-ipython", "ipython");
37 CodeMirror.defineMIME("text/x-ipython", "ipython");
38 })
38 })
39
@@ -59,6 +59,4
59 }, 'gfm');
59 }, 'gfm');
60
60
61 CodeMirror.defineMIME("text/x-ipythongfm", "ipythongfm");
61 CodeMirror.defineMIME("text/x-ipythongfm", "ipythongfm");
62
63
64 })
62 })
General Comments 0
You need to be logged in to leave comments. Login now