mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-03-06 06:39:18 -05:00
fix(curriculum): replace head content regex (#55925)
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user