fix(curriculum) replace head content regex (#55922)

This commit is contained in:
Lasse Jørgensen
2024-08-26 08:43:32 +02:00
committed by GitHub
parent ab2bf223cb
commit 9d7fa46e4e

View File

@@ -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");