##// END OF EJS Templates
patch header-cell and use-strict
Matthias BUSSONNIER -
Show More
@@ -17,6 +17,7 b''
17 @namespace IPython
17 @namespace IPython
18 */
18 */
19 var IPython = (function (IPython) {
19 var IPython = (function (IPython) {
20 "use strict";
20
21
21 // TextCell base class
22 // TextCell base class
22 var key = IPython.utils.keycodes;
23 var key = IPython.utils.keycodes;
@@ -315,9 +316,9 b' var IPython = (function (IPython) {'
315 if (this.rendered === false) {
316 if (this.rendered === false) {
316 var text = this.get_text();
317 var text = this.get_text();
317 if (text === "") { text = this.placeholder; }
318 if (text === "") { text = this.placeholder; }
318 text_math = IPython.mathjaxutils.remove_math(text);
319 var text_math = IPython.mathjaxutils.remove_math(text);
319 text = text_math[0]
320 var text = text_math[0]
320 math = text_math[1]
321 var math = text_math[1]
321 var html = marked.parser(marked.lexer(text));
322 var html = marked.parser(marked.lexer(text));
322 html = $(IPython.mathjaxutils.replace_math(html, math));
323 html = $(IPython.mathjaxutils.replace_math(html, math));
323 // links in markdown cells should open in new tabs
324 // links in markdown cells should open in new tabs
@@ -521,9 +522,11 b' var IPython = (function (IPython) {'
521 text = text.replace(/\n/g, ' ');
522 text = text.replace(/\n/g, ' ');
522 if (text === "") { text = this.placeholder; }
523 if (text === "") { text = this.placeholder; }
523 text = Array(this.level + 1).join("#") + " " + text;
524 text = Array(this.level + 1).join("#") + " " + text;
524 text = IPython.mathjaxutils.remove_math(text);
525 var text_and_math = IPython.mathjaxutils.remove_math(text);
526 var text = text_and_math[0];
527 var math = text_and_math[1];
525 var html = marked.parser(marked.lexer(text));
528 var html = marked.parser(marked.lexer(text));
526 var h = $(IPython.mathjaxutils.replace_math(html));
529 var h = $(IPython.mathjaxutils.replace_math(html, math));
527 // add id and linkback anchor
530 // add id and linkback anchor
528 var hash = h.text().replace(/ /g, '-');
531 var hash = h.text().replace(/ /g, '-');
529 h.attr('id', hash);
532 h.attr('id', hash);
General Comments 0
You need to be logged in to leave comments. Login now