Fix HTML head content built from 'Download examples' button

This commit is contained in:
Julien Déramond 2025-05-13 23:02:13 +02:00
parent 0a005b3604
commit 7b325e33c7
No known key found for this signature in database
GPG Key ID: EE5F274EA1F477FA
1 changed files with 3 additions and 3 deletions

View File

@ -88,9 +88,9 @@ for (const file of sh.find(`${distFolder}/**/*.html`)) {
.toString()
.replace(new RegExp(`"/docs/${versionShort}/`, 'g'), '"../')
.replace(/"..\/dist\//g, '"../assets/dist/')
.replace(/(<link href="\.\.\/.*) integrity=".*>/g, '$1>')
.replace(/(<script src="\.\.\/.*) integrity=".*>/g, '$1></script>')
.replace(/( +)<!-- favicons(.|\n)+<style>/i, ' <style>')
.replace(/(<link href="\.\.\/[^"]*"[^>]*) integrity="[^"]*"/g, '$1')
.replace(/<link[^>]*href="\.\.\/assets\/img\/favicons\/[^"]*"[^>]*>/g, '')
.replace(/(<script src="\.\.\/[^"]*"[^>]*) integrity="[^"]*"/g, '$1')
new sh.ShellString(fileContents).to(file)
}