Hi, I have just noticed that the parser fails to parse the unit if there is a space in the unit string.
Here an example:
from parse_ingredients import parse_ingredient
parse_ingredient('100 milli gram sugar')
returns:
Ingredient(name='milli gram sugar', quantity=100.0, unit='', comment='', original_string='100 milli gram sugar')
instead of the expected result, i.e.:
Ingredient(name='sugar', quantity=100.0, unit='milli gram', comment='', original_string='100 milli gram sugar')
even if "milli gram" is in the list of the recognized units.
Hi, I have just noticed that the parser fails to parse the unit if there is a space in the unit string.
Here an example:
from parse_ingredients import parse_ingredient
parse_ingredient('100 milli gram sugar')
returns:
Ingredient(name='milli gram sugar', quantity=100.0, unit='', comment='', original_string='100 milli gram sugar')
instead of the expected result, i.e.:
Ingredient(name='sugar', quantity=100.0, unit='milli gram', comment='', original_string='100 milli gram sugar')
even if "milli gram" is in the list of the recognized units.