added a TODO about using regex to speed up the patch of bmg-edit

This commit is contained in:
Faraphel 2022-07-15 00:31:28 +02:00
parent 06a557dac7
commit 5aeb864ef7

View file

@ -355,6 +355,8 @@ class PatchOperation:
self.template = template
def patch_bmg(self, patch: "Patch", decoded_content: str) -> str:
# TODO : use regex in a better way to optimise speed
new_bmg_lines: list[str] = []
for line in decoded_content.split("\n"):
if (match := re.match(r"^ {2}(?P<id>.*?)\t= (?P<value>.*)$", line, re.DOTALL)) is None: