viktorstrate / algebra-latex

Parse and calculate latex formatted math
https://www.npmjs.com/package/algebra-latex
MIT License
28 stars 9 forks source link

Parse latex string gives wrong result #12

Closed DylanXie123 closed 4 years ago

DylanXie123 commented 4 years ago

Parse expression '3/4/5' gives wrong result, it should be '3/20', but it gives '15/4' instead.

const algebraLatex = require("algebra-latex");
const algebrite = require('algebrite');

const parser = new algebraLatex();
let expStr = '3/4/5';
parser.parseLatex(expStr);
let exp = parser.toAlgebra(algebrite);
console.log(exp.toString()) // gives "15/4" here
viktorstrate commented 4 years ago

This should be fixed in v2.0.1

DylanXie123 commented 4 years ago

That works, thanks!