Show More
@@ -106,12 +106,11 b' IPython.mathjaxutils = (function (IPython) {' | |||||
106 | // math, then push the math string onto the storage array. |
|
106 | // math, then push the math string onto the storage array. | |
107 | // The preProcess function is called on all blocks if it has been passed in |
|
107 | // The preProcess function is called on all blocks if it has been passed in | |
108 | var process_math = function (i, j, pre_process, math, blocks) { |
|
108 | var process_math = function (i, j, pre_process, math, blocks) { | |
109 | var hub = MathJax.Hub; |
|
|||
110 | var block = blocks.slice(i, j + 1).join("").replace(/&/g, "&") // use HTML entity for & |
|
109 | var block = blocks.slice(i, j + 1).join("").replace(/&/g, "&") // use HTML entity for & | |
111 | .replace(/</g, "<") // use HTML entity for < |
|
110 | .replace(/</g, "<") // use HTML entity for < | |
112 | .replace(/>/g, ">") // use HTML entity for > |
|
111 | .replace(/>/g, ">") // use HTML entity for > | |
113 | ; |
|
112 | ; | |
114 |
if ( |
|
113 | if (IPython.utils.browser === 'msie') { | |
115 | block = block.replace(/(%[^\n]*)\n/g, "$1<br/>\n"); |
|
114 | block = block.replace(/(%[^\n]*)\n/g, "$1<br/>\n"); | |
116 | } |
|
115 | } | |
117 | while (j > i) { |
|
116 | while (j > i) { | |
@@ -133,10 +132,6 b' IPython.mathjaxutils = (function (IPython) {' | |||||
133 | // (which will be a paragraph). |
|
132 | // (which will be a paragraph). | |
134 | // |
|
133 | // | |
135 | var remove_math = function (text) { |
|
134 | var remove_math = function (text) { | |
136 | if (!window.MathJax) { |
|
|||
137 | return [text, null]; |
|
|||
138 | } |
|
|||
139 |
|
||||
140 | var math = []; // stores math strings for later |
|
135 | var math = []; // stores math strings for later | |
141 | var start; |
|
136 | var start; | |
142 | var end; |
|
137 | var end; | |
@@ -241,9 +236,6 b' IPython.mathjaxutils = (function (IPython) {' | |||||
241 | // and clear the math array (no need to keep it around). |
|
236 | // and clear the math array (no need to keep it around). | |
242 | // |
|
237 | // | |
243 | var replace_math = function (text, math) { |
|
238 | var replace_math = function (text, math) { | |
244 | if (!window.MathJax) { |
|
|||
245 | return text; |
|
|||
246 | } |
|
|||
247 | text = text.replace(/@@(\d+)@@/g, function (match, n) { |
|
239 | text = text.replace(/@@(\d+)@@/g, function (match, n) { | |
248 | return math[n]; |
|
240 | return math[n]; | |
249 | }); |
|
241 | }); |
General Comments 0
You need to be logged in to leave comments.
Login now