mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Auto merge of #20097 - Manishearth:mutate-if-let, r=asajeffrey
Do not mutate if let <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20097) <!-- Reviewable:end -->
This commit is contained in:
commit
f90e98dcc9
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