LHNCBC / ucum-lhc

LHC implementation of UCUM validation and conversion services

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Validator throws error on some curly brace expressions

mjszczep opened this issue · comments

An expression like {g} is a little weird since it seems pretty meaningless (and more often than not I'd expect you'd mean g, grams, rather than {g}, a unitless annotated expression), but it is nonetheless perfectly valid. The validator, however, doesn't seem to think so:

image

This is even weirder because it seems totally willing to behave correctly in other cases, like {a} instead of a for years:

image

Thanks for the report. What seems to be the case is that any string that exists as a unit if you wrap it in brackets is not accepted as a stand-alone annotation. That shouldn't be.

The reason for this was that if someone types something like {degF}, they probably mean [degF], and so it was returning a message about that, and also treating it as an error. This is now fixed in version 5.0.0 of ucum-lhc and in the demo site. A warning message is still returned, but it is no longer marked invalid.