Browse Source

Fix MathJax fail caused application crash

pull/6/head
Menci 6 years ago
parent
commit
043d75519e
  1. 2
      libs/markdown.js

2
libs/markdown.js

@ -65,7 +65,7 @@ function render(s, cb) {
},
mathRenderer: function(str, display) {
let mathFinish = (error, result) => {
if (error) maths[id] = '<p><div style="display: inline-block; border: 1px solid #000; "><strong>' + data.errors.toString() + '</strong></div></p>';
if (error) maths[id] = '<p><div style="display: inline-block; border: 1px solid #000; "><strong>' + error.toString() + '</strong></div></p>';
else if (display) maths[id] = '<p style="text-align: center; ">' + result + '</p>';
else maths[id] = result;
if (cacheOption.math) cache.set('M_' + display + '_' + str, maths[id]);

Loading…
Cancel
Save