[Grammar] Better decimal point handling

- Now replaced only if in a middle of a number
This commit is contained in:
Salvador E. Tropea 2023-03-31 10:45:57 -03:00
parent 46739c8ea0
commit 9393bd2f41
1 changed files with 1 additions and 1 deletions

View File

@ -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