mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-03-04 08:05:48 -05:00
fix(curriculum) replace head content regex (#55922)
This commit is contained in:
@@ -22,7 +22,7 @@ assert.strictEqual(document.querySelectorAll('link')?.length, 3);
|
||||
Your `link` elements 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");
|
||||
@@ -76,7 +76,7 @@ assert.strictEqual(title?.length, 1);
|
||||
Your `title` 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