fast-formula-parser
fast-formula-parser copied to clipboard
Decimal without leading zero
50*.85
throws an error while 50*0.85
works.
Is this an issue with the parser?
I solved this by forcing a regex check :P
const regex = /([^\d|a-z])\.(\d+)/g;
return text.replace(regex, "$10.$2");