mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-03-03 14:01:27 -05:00
fix(curriculum) replace head content regex (#55923)
This commit is contained in:
@@ -39,7 +39,7 @@ assert.notMatch(code, /<\/link>/);
|
||||
Your `link` element should be inside your `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