diff --git a/IPython/frontend/html/notebook/static/notebook/js/main.js b/IPython/frontend/html/notebook/static/notebook/js/main.js
index ae2123142..0024d6ce1 100644
--- a/IPython/frontend/html/notebook/static/notebook/js/main.js
+++ b/IPython/frontend/html/notebook/static/notebook/js/main.js
@@ -8,17 +8,27 @@
//============================================================================
// On document ready
//============================================================================
+"use strict";
+// for the time beeing, we have to pass marked as a parameter here,
+// 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(['components/marked/lib/marked'],
-$(document).ready(function () {
+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
if(CodeMirror.getMode(1,'text/plain').indent == undefined ){
console.log('patching CM for undefined indent');
- CodeMirror.modes.null = function() { return {token: function(stream) {stream.skipToEnd();},indent : function(){return 0}}}
+ CodeMirror.modes.null = function() {
+ return {token: function(stream) {stream.skipToEnd();},indent : function(){return 0}}
}
+ }
CodeMirror.patchedGetMode = function(config, mode){
var cmmode = CodeMirror.getMode(config, mode);
@@ -90,10 +100,10 @@ $(document).ready(function () {
// only do this once
$([IPython.events]).off('notebook_loaded.Notebook', first_load);
};
-
+
$([IPython.events]).on('notebook_loaded.Notebook', first_load);
IPython.notebook.load_notebook($('body').data('notebookId'));
-
+
if (marked) {
marked.setOptions({
gfm : true,
@@ -110,6 +120,6 @@ $(document).ready(function () {
}
})
}
+}
-});
-
+);
diff --git a/IPython/frontend/html/notebook/templates/notebook.html b/IPython/frontend/html/notebook/templates/notebook.html
index 4bbb1c461..6b16017d2 100644
--- a/IPython/frontend/html/notebook/templates/notebook.html
+++ b/IPython/frontend/html/notebook/templates/notebook.html
@@ -206,7 +206,6 @@ class="notebook_app"
-
diff --git a/IPython/frontend/html/notebook/templates/page.html b/IPython/frontend/html/notebook/templates/page.html
index e9354dd6e..b92027b5f 100644
--- a/IPython/frontend/html/notebook/templates/page.html
+++ b/IPython/frontend/html/notebook/templates/page.html
@@ -24,7 +24,12 @@
{% endblock %}
{% endblock %}
-
+
+
{% block meta %}
{% endblock %}