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

This commit is contained in:
Lasse Jørgensen
2024-08-26 08:42:57 +02:00
committed by GitHub
parent de11fd5d31
commit ab2bf223cb

View File

@@ -39,7 +39,7 @@ assert.notMatch(code, /<\/link>/);
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");