mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-09-24 23:01:18 +08:00
fix(curriculum): replace head content regex (#55924)
This commit is contained in:
+1
-1
@@ -33,7 +33,7 @@ assert.strictEqual(document.querySelectorAll('link')?.length, 1);
|
||||
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