diff --git a/IPython/frontend/html/notebook/static/notebook/js/config.js b/IPython/frontend/html/notebook/static/notebook/js/config.js index 56e3656..432fb2b 100644 --- a/IPython/frontend/html/notebook/static/notebook/js/config.js +++ b/IPython/frontend/html/notebook/static/notebook/js/config.js @@ -8,16 +8,15 @@ //============================================================================ // Notebook //============================================================================ -"use strict"; /** * @module IPython * @namespace IPython **/ -define(function () { +var IPython = (function (IPython) { /** - * A place where some stuff can be configured. + * A place where some stuff can be confugured. * * @class config * @static @@ -70,9 +69,10 @@ define(function () { }; // use the same method to merge user configuration - var config = {}; - $.extend(config, default_config); + IPython.config = {}; + $.extend(IPython.config, default_config); - return config; -}); + return IPython; + +}(IPython)); diff --git a/IPython/frontend/html/notebook/static/notebook/js/main.js b/IPython/frontend/html/notebook/static/notebook/js/main.js index 2ecb151..8c21b3a 100644 --- a/IPython/frontend/html/notebook/static/notebook/js/main.js +++ b/IPython/frontend/html/notebook/static/notebook/js/main.js @@ -14,15 +14,12 @@ // as injecting require.js make marked not to put itself in the globals, // which make both this file fail at setting marked configuration, and textcell.js // which search marked into global. -require(['static/components/marked/lib/marked.js', - 'static/notebook/js/config.js'], +require(['static/components/marked/lib/marked.js'], -function (marked, config) { - - IPython.config = config; - console.log('config is',config); +function (marked) { window.marked = marked + // monkey patch CM to be able to syntax highlight cell magics // bug reported upstream, // see https://github.com/marijnh/CodeMirror2/issues/670 @@ -107,7 +104,6 @@ function (marked, config) { $([IPython.events]).on('notebook_loaded.Notebook', first_load); IPython.notebook.load_notebook($('body').data('notebookId')); - var marked; if (marked) { marked.setOptions({ gfm : true, diff --git a/IPython/frontend/html/notebook/templates/notebook.html b/IPython/frontend/html/notebook/templates/notebook.html index e171aff..80b53a6 100644 --- a/IPython/frontend/html/notebook/templates/notebook.html +++ b/IPython/frontend/html/notebook/templates/notebook.html @@ -230,6 +230,7 @@ class="notebook_app" +