From 9393bd2f410ea53ca69f5536c33322016464e621 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Fri, 31 Mar 2023 10:45:57 -0300 Subject: [PATCH] [Grammar] Better decimal point handling - Now replaced only if in a middle of a number --- kibot/bom/units.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kibot/bom/units.py b/kibot/bom/units.py index 98cd454b..150db616 100644 --- a/kibot/bom/units.py +++ b/kibot/bom/units.py @@ -183,7 +183,7 @@ def comp_match(component, ref_prefix, ref=None): if decimal_point == '.': decimal_point = '' if decimal_point: - component = component.replace(decimal_point, ".") + component = re.sub(r'(\d)'+decimal_point+r'(\d)', r'\1.\2', component) with_commas = component # Remove any commas