MathJax-node
MathJax-node copied to clipboard
MathJax freezing and consuming 100% CPU
MathJax become unresponsive and consuming 100% CPU on following LaTeX. Timeout setting does not help :(
const mathjax = require('mathjax-node');
mathjax.start();
equation = 'so\\ i\\ did\\ _{_{_{_{_{_{_{_{_{_{_{_{_{_{_{_{_{_{_{_{_{_{_{_{_{_{_{_{_{_{_{=-----------------------------------------------------------------------------------------------------------------------------------}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}9315';
mathjax.typeset(
{ math: equation
, format: 'TeX'
, svg: true
, linebreaks: true
, timeout: 10 * 1000
}
, function (data) {
console.log(data);
}
);
Any ideas how to solve this?
This appears to be a problem in the line-breaking algorithm. Can you turn that off for this example?
Well, it's user generated content through Equation Editor, so I can't predict what would it be. And for big texts I need line breaks :(