mirror of
https://github.com/Faraphel/Atlas-Install.git
synced 2025-07-04 03:38:26 +02:00
added a TODO about using regex to speed up the patch of bmg-edit
This commit is contained in:
parent
06a557dac7
commit
5aeb864ef7
1 changed files with 2 additions and 0 deletions
|
@ -355,6 +355,8 @@ class PatchOperation:
|
||||||
self.template = template
|
self.template = template
|
||||||
|
|
||||||
def patch_bmg(self, patch: "Patch", decoded_content: str) -> str:
|
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] = []
|
new_bmg_lines: list[str] = []
|
||||||
for line in decoded_content.split("\n"):
|
for line in decoded_content.split("\n"):
|
||||||
if (match := re.match(r"^ {2}(?P<id>.*?)\t= (?P<value>.*)$", line, re.DOTALL)) is None:
|
if (match := re.match(r"^ {2}(?P<id>.*?)\t= (?P<value>.*)$", line, re.DOTALL)) is None:
|
||||||
|
|
Loading…
Reference in a new issue