compute-engine icon indicating copy to clipboard operation
compute-engine copied to clipboard

Incorrectly parses input with `latexOptions.decimalMarker` option set to `{,}`

Open hanshs opened this issue 3 years ago • 0 comments

It doesn't seem like ComputeEngine properly parses latex input with latexOptions.decimalMarker set to "{,}"

const ce = new ComputeEngine()
ce.latexOptions = { decimalMarker: "{,}" }

const { json } = ce.parse("12{,}3")
// json -> ["Error",12,"'syntax-error'",["LatexForm","'{,}3'"]]

// Now it also breaks when parsing input with `.` as separator
const { json } = ce.parse("12.3")
// json -> ["Error",12,"'syntax-error'",["LatexForm","'.3'"]]

hanshs avatar Aug 15 '22 15:08 hanshs