js-quantities
js-quantities copied to clipboard
Unit not recognized - parsing issue?
Hi,
I need to create two combined units: '% / g/m²' and '°C / g/m²'.
When I used Qty('% / g / m2') or Qty('% / g m-2') or Qty('% m2/g'), I have the error "Unit not recognized". However, when I used Qty('m2/g %'), it is ok.
When I used Qty('degC / g / m2') or Qty('degC / g m-2'), I have the error "Unit not recognized". However, when I used Qty('m2/g degC') or Qty('degC m2/g'), it is ok.
Could be a parsing issue? Did I miss something on documentation?
Thanks in advance for you feedback. Sophie
You just came across a parsing bug with %. I will try to fix it shortly. It's far from ideal but you could replace % with percent if it is acceptable for your use case.