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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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