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