js-quantities icon indicating copy to clipboard operation
js-quantities copied to clipboard

Unit not recognized - parsing issue?

Open SophieLM opened this issue 7 years ago • 1 comments

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

SophieLM avatar Mar 29 '18 20:03 SophieLM

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.

gentooboontoo avatar Apr 02 '18 21:04 gentooboontoo