From 2489eccb74fcfd3f0f286cb0c90f3e19d2e8b4f6 Mon Sep 17 00:00:00 2001 From: Bertrand Benjamin Date: Fri, 5 Oct 2018 10:31:51 +0200 Subject: [PATCH] Fix(parsing): Remove spaces in string before parsing --- mapytex/calculus/core/str2.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mapytex/calculus/core/str2.py b/mapytex/calculus/core/str2.py index c9f64d3..f825ae8 100644 --- a/mapytex/calculus/core/str2.py +++ b/mapytex/calculus/core/str2.py @@ -661,7 +661,7 @@ def str2(sink, convert_to_mo=True): | > + | | > 3 | | > -4 - >>> exp = "3-a" + >>> exp = "3 - a" >>> t = str2tree(exp) >>> print(t) + @@ -689,7 +689,7 @@ def str2(sink, convert_to_mo=True): else: str2_corout = lookforNumbers(operator_corout(missing_times(pparser(sink)))) - for i in expression: + for i in expression.replace(" ",""): str2_corout.send(i) a = str2_corout.throw(STOOOP)