Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
splitMath = _.memoize((math: string) => {
let parser = new TexParser(
math,
{ display: true, isInner: false },
this.parseOptions
);
parser.i = 0; // reset parser
const response = [];
while (parser.i < parser.string.length) {
response.push(parser.GetArgument(math, true))
}
/*
* try to compose bbox
const mathItems = _.map(response, (frag, index, collection) => {
const bip = new HTMLMathItem(frag, this.tex, true);
bip.compile(this.html.document)
bip.bbox = this.svg.getBBox(bip, this.html);