fix(curriculum): regex compatibility issue for Safari (#41725)
* fix(curriculum) regex compatibility issue for Safari * fix: escape the dot parameter in regex Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com> Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>pull/41783/head
parent
1f9166922c
commit
d4aef30ea7
|
@ -23,10 +23,19 @@ The `penguin` class should reassign the `--penguin-belly` variable to `white`.
|
|||
|
||||
```js
|
||||
assert(
|
||||
code.match(/\.penguin\s*?{[\s\S]*(?<!background-color: )--penguin-belly\s*?:\s?white\s*?;[\s\S]*}/gi)
|
||||
code.match(/\.penguin\s*?{[\s\S]*--penguin-belly\s*?:\s*?white\s*?;[\s\S]*}/gi)
|
||||
);
|
||||
```
|
||||
|
||||
The `penguin` class should not contain the `background-color` property
|
||||
|
||||
```js
|
||||
assert(
|
||||
code.match(/^((?!background-color\s*?:\s*?)[\s\S])*$/g)
|
||||
);
|
||||
```
|
||||
|
||||
|
||||
# --seed--
|
||||
|
||||
## --seed-contents--
|
||||
|
|
Loading…
Reference in New Issue