This repl tests how math expressions are cleaned and postfixed.
To view this on TripleLog, click here
The updateSheet.js file reads some data from a Google Sheet. You will need to add authentication to run this update. If you don't want/need to do this, then it is not necessary. Create the API account if you haven't already and add a service worker account key. View the google-spreadsheet documentation to get started. Read my blog post about how to convert a Google Sheet to an HTML table.
There are 3 sheets in the spreadsheet: one for expressions to replace before whitespace is removed, one for after, and then a sheet of tests.
The index.html is a generated file so if you change it then your changes will be overwritten. Edit the template.html file. When you click the run test button, all of the inputs are cleaned and postfixed.
The left side includes the original input and the (usually) correct cleaned version. The right side will then include the tested cleaned version, the infix array, and the postfix array.
The JavaScript is includes several files to convert the strings.
The index.js file reads the 3 json files and modifies the clean js file and generates the index.html file.
If you change the data or test jsons or the template.html you will need to rerun the index.js file.