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

This commit is contained in:
Lasse Jørgensen
2024-08-26 08:42:01 +02:00
committed by GitHub
parent 5f832ce12c
commit 10f8df5d8b

View File

@@ -30,7 +30,7 @@ assert.notMatch(code, /<\/link>/);
Your two `link` elements should be inside the `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");