mirror of
https://github.com/servo/servo.git
synced 2025-07-02 13:03:43 +01:00
Do not mutate if let
This commit is contained in:
parent
691f3be24a
commit
1fedba81f7
1 changed files with 2 additions and 2 deletions
|
@ -65,7 +65,7 @@ class AndOr(Strategy):
|
|||
class IfTrue(Strategy):
|
||||
def __init__(self):
|
||||
Strategy.__init__(self)
|
||||
if_condition = r"(?<=if\s)(.*)(?=\s\{)"
|
||||
if_condition = r"(?<=if\s)\s*(?!let\s)(.*)(?=\s\{)"
|
||||
self._replace_strategy = {
|
||||
'regex': if_condition,
|
||||
'replaceString': 'true'
|
||||
|
@ -75,7 +75,7 @@ class IfTrue(Strategy):
|
|||
class IfFalse(Strategy):
|
||||
def __init__(self):
|
||||
Strategy.__init__(self)
|
||||
if_condition = r"(?<=if\s)(.*)(?=\s\{)"
|
||||
if_condition = r"(?<=if\s)\s*(?!let\s)(.*)(?=\s\{)"
|
||||
self._replace_strategy = {
|
||||
'regex': if_condition,
|
||||
'replaceString': 'false'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue