From a991678a734727691840bbf0afc70835f6532fa8 Mon Sep 17 00:00:00 2001 From: Adam Hitchcock Date: Wed, 6 Jan 2021 12:09:06 -0800 Subject: [PATCH] Allow input like "3 tbsp to tsp" or "3 mi as km" --- src/convert.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/convert.py b/src/convert.py index db28bfa..2e53938 100755 --- a/src/convert.py +++ b/src/convert.py @@ -478,7 +478,7 @@ def parse_units(self, query, qty=1): """ from_unit = to_unit = None - units = [s.strip() for s in query.split()] + units = [s.strip() for s in query.split() if s.strip() not in ('to', 'as')] from_unit = units[0] log.debug('[parser] from_unit=%s', from_unit)