Skip to content

Commit 9d7fa46

Browse files
authored
fix(curriculum) replace head content regex (freeCodeCamp#55922)
1 parent ab2bf22 commit 9d7fa46

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

curriculum/challenges/english/14-responsive-web-design-22/learn-css-grid-by-building-a-magazine/614385513d91ae5c251c2052.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ assert.strictEqual(document.querySelectorAll('link')?.length, 3);
2222
Your `link` elements should be inside your `head` element.
2323
2424
```js
25-
const headContentRegex = /(?<=<head\s*>)(?:.|\s*)*?(?=<\/head\s*>)/;
25+
const headContentRegex = /(?<=<head\s*>)[\S|\s]*(?=<\/head\s*>)/;
2626
const headElementContent = code.match(headContentRegex);
2727

2828
const headElement = document.createElement("head");
@@ -76,7 +76,7 @@ assert.strictEqual(title?.length, 1);
7676
Your `title` element should be inside your `head` element.
7777

7878
```js
79-
const headContentRegex = /(?<=<head\s*>)(?:.|\s*)*?(?=<\/head\s*>)/;
79+
const headContentRegex = /(?<=<head\s*>)[\S|\s]*(?=<\/head\s*>)/;
8080
const headElementContent = code.match(headContentRegex);
8181
8282
const headElement = document.createElement("head");

0 commit comments

Comments
 (0)