Skip to content
Snippets Groups Projects
Commit 473eebb0 authored by George Marchment's avatar George Marchment
Browse files

Update putting back the modified operations

parent ed08450d
No related branches found
No related tags found
No related merge requests found
Pipeline #14489 failed with stage
in 2 minutes and 5 seconds
...@@ -20,9 +20,9 @@ class Code: ...@@ -20,9 +20,9 @@ class Code:
self.code_wo_comments = re.sub(constant.DOUBLE_BACKSLAPSH_JUMP, ' ', self.code_wo_comments) self.code_wo_comments = re.sub(constant.DOUBLE_BACKSLAPSH_JUMP, ' ', self.code_wo_comments)
self.code_wo_comments = re.sub(constant.BACKSLAPSH_JUMP, ' ', self.code_wo_comments) self.code_wo_comments = re.sub(constant.BACKSLAPSH_JUMP, ' ', self.code_wo_comments)
self.code_wo_comments = self.code_wo_comments.replace("||", "$OR$") self.code_wo_comments = self.code_wo_comments.replace("||", "$OR$")
self.code_wo_comments = self.add_triple_quote_inside_map(self.code_wo_comments )
self.code_wo_comments = self.turn_single_condition_into_multiline(self.code_wo_comments) self.code_wo_comments = self.turn_single_condition_into_multiline(self.code_wo_comments)
self.code_wo_comments = self.rewrite_ternary_operation_to_normal_condition(self.code_wo_comments) self.code_wo_comments = self.rewrite_ternary_operation_to_normal_condition(self.code_wo_comments)
self.code_wo_comments = self.add_triple_quote_inside_map(self.code_wo_comments )
self.code_wo_comments = self.rewrite_jump_dot(self.code_wo_comments) self.code_wo_comments = self.rewrite_jump_dot(self.code_wo_comments)
......
...@@ -452,7 +452,7 @@ George Marchment, Bryan Brancotte, Marie Schmit, Frédéric Lemoine, Sarah Cohen ...@@ -452,7 +452,7 @@ George Marchment, Bryan Brancotte, Marie Schmit, Frédéric Lemoine, Sarah Cohen
searching = False searching = False
for match in re.finditer(r"\.(\w+)_modified\s*\{\s*¤\'\'\'([^¤]+)¤\s*\}", code): for match in re.finditer(r"\.(\w+)_modified\s*\{\s*¤\'\'\'([^¤]+)¤\s*\}", code):
operator = match.group(1) operator = match.group(1)
inside = match.group(2)[2:-3]#Cause we want to remove the extras '''...''' inside = match.group(2)[:-3]#Cause we want to remove the extras ...'''
code = code.replace(match.group(0), f".{operator} {{ {inside} }}") code = code.replace(match.group(0), f".{operator} {{ {inside} }}")
searching = True searching = True
break break
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment