From 8a1f94c832b4760d7412a1648ec57d45fe76e749 Mon Sep 17 00:00:00 2001 From: jspijker Date: Tue, 29 Nov 2022 16:23:59 +0100 Subject: [PATCH] Fix format-definition-paired-coordinate-array --- .../src/printerlinter/formatters/def_json_formatter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/printer-linter/src/printerlinter/formatters/def_json_formatter.py b/printer-linter/src/printerlinter/formatters/def_json_formatter.py index f839594ea5..f99fe5bfb4 100644 --- a/printer-linter/src/printerlinter/formatters/def_json_formatter.py +++ b/printer-linter/src/printerlinter/formatters/def_json_formatter.py @@ -51,8 +51,8 @@ class DefJsonFormatter(FileFormatter): content = single_value_list.sub(r"\1 [ \3 ]\5", content) if self._settings["format"].get("format-definition-paired-coordinate-array", True): - paired_coordinates = re.compile(r"(\[)\s+(-?\d*),\s*(-?\d*)\s*(\])") - content = paired_coordinates.sub(r"\1 \2, \3 \4", content) + paired_coordinates = re.compile(r"(\s*\[)\s*([-\d\.]+),\s*([-\d\.]+)[\s]*(\])") + content = paired_coordinates.sub(r"\1\2, \3\4", content) file.write_text(content)