@@ -314,10 +314,11 @@ var IPython = (function (IPython) {
314314 MarkdownCell . prototype . render = function ( ) {
315315 if ( this . rendered === false ) {
316316 var text = this . get_text ( ) ;
317+ var math = null ;
317318 if ( text === "" ) { text = this . placeholder ; }
318- var text_math = IPython . mathjaxutils . remove_math ( text ) ;
319- var text = text_math [ 0 ] ;
320- var math = text_math [ 1 ] ;
319+ var text_and_math = IPython . mathjaxutils . remove_math ( text ) ;
320+ text = text_and_math [ 0 ] ;
321+ math = text_and_math [ 1 ] ;
321322 var html = marked . parser ( marked . lexer ( text ) ) ;
322323 html = $ ( IPython . mathjaxutils . replace_math ( html , math ) ) ;
323324 // links in markdown cells should open in new tabs
@@ -517,13 +518,14 @@ var IPython = (function (IPython) {
517518 HeadingCell . prototype . render = function ( ) {
518519 if ( this . rendered === false ) {
519520 var text = this . get_text ( ) ;
521+ var math = null ;
520522 // Markdown headings must be a single line
521523 text = text . replace ( / \n / g, ' ' ) ;
522524 if ( text === "" ) { text = this . placeholder ; }
523525 text = Array ( this . level + 1 ) . join ( "#" ) + " " + text ;
524526 var text_and_math = IPython . mathjaxutils . remove_math ( text ) ;
525- var text = text_and_math [ 0 ] ;
526- var math = text_and_math [ 1 ] ;
527+ text = text_and_math [ 0 ] ;
528+ math = text_and_math [ 1 ] ;
527529 var html = marked . parser ( marked . lexer ( text ) ) ;
528530 var h = $ ( IPython . mathjaxutils . replace_math ( html , math ) ) ;
529531 // add id and linkback anchor
0 commit comments