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
Sem Bauke 2021-04-09 05:39:57 +01:00 committed by GitHub
parent 1f9166922c
commit d4aef30ea7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 1 deletions

View File

@ -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--