fix(curriculum): replace head content regex (#55924)

This commit is contained in:
Lasse Jørgensen
2024-08-26 08:42:35 +02:00
committed by GitHub
parent 10f8df5d8b
commit de11fd5d31
@@ -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");