Move code cell config earlier, closes #257

This commit is contained in:
Andrew Gibiansky 2014-08-18 13:06:07 -07:00
parent 9864f87875
commit e63ff01ea9

View File

@ -21,6 +21,8 @@ $([IPython.events]).on('app_initialized.NotebookApp', function(){
// IPython keycodes.
IPython.keyboard.keycodes.down = 32; // space
IPython.CodeCell.options_default['cm_config']['mode'] = 'haskell';
CodeMirror.requireMode('haskell', function(){
// Create a multiplexing mode that uses Haskell highlighting by default but
@ -54,8 +56,6 @@ $([IPython.events]).on('app_initialized.NotebookApp', function(){
require(['/static/custom/conceal/conceal.js']);
});
IPython.CodeCell.options_default['cm_config']['mode'] = 'haskell';
// Prevent the pager from surrounding everything with a <pre>
IPython.Pager.prototype.append_text = function (text) {
this.pager_element.find(".container").append($('<div/>').html(IPython.utils.autoLinkUrls(text)));