Brewtarget / brewtarget

Main brewtarget source code repository.
GNU General Public License v3.0
313 stars 134 forks source link

Case insensitive matching of unit names (mL vs ml etc) #725

Closed mikfire closed 1 year ago

mikfire commented 1 year ago

I know the proper notation is mL. But could we maybe stretch the definitions a little and make 'ml' an equivalent? I keep forgetting and the volume entries will default to L when they don't recognize the unit. The difference between 3 mL of lactic acid and 3 L is significant and somewhat surprising.

matty0ung commented 1 year ago

Yes, that's a good idea. I wouldn't remember it was mL either! Maybe it will suffice to do case-insensitive matching. I'll have a look.

matty0ung commented 1 year ago

Looks like the fix isn't too bad, but I need to make it in two different places, which is annoying me. I'll either try to fix that duplication or comment why it's hard to do so! :smiley:

matty0ung commented 1 year ago

Included in https://github.com/Brewtarget/brewtarget/releases/tag/v3.0.8..