mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-06-16 21:06:35 +08:00
fix(curriculum): replace head content regex (#55925)
This commit is contained in:
parent
5f832ce12c
commit
10f8df5d8b
@ -30,7 +30,7 @@ assert.notMatch(code, /<\/link>/);
|
||||
Your two `link` elements should be inside the `head` element.
|
||||
|
||||
```js
|
||||
const headContentRegex = /(?<=<head\s*>)(?:.|\s*)*?(?=<\/head\s*>)/;
|
||||
const headContentRegex = /(?<=<head\s*>)[\S|\s]*(?=<\/head\s*>)/;
|
||||
const headElementContent = code.match(headContentRegex);
|
||||
|
||||
const headElement = document.createElement("head");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user