LesterLyu/fast-formula-parser

Decimal without leading zero

Opened this issue · 1 comments

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");