Skip to content

Commit e5b9f37

Browse files
Fix HTML head content built from 'Download examples' button (#41468)
1 parent 0a005b3 commit e5b9f37

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

build/zip-examples.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ for (const file of sh.find(`${distFolder}/**/*.html`)) {
8888
.toString()
8989
.replace(new RegExp(`"/docs/${versionShort}/`, 'g'), '"../')
9090
.replace(/"..\/dist\//g, '"../assets/dist/')
91-
.replace(/(<link href="\.\.\/.*) integrity=".*>/g, '$1>')
92-
.replace(/(<script src="\.\.\/.*) integrity=".*>/g, '$1></script>')
93-
.replace(/( +)<!-- favicons(.|\n)+<style>/i, ' <style>')
91+
.replace(/(<link href="\.\.\/[^"]*"[^>]*) integrity="[^"]*"/g, '$1')
92+
.replace(/<link[^>]*href="\.\.\/assets\/img\/favicons\/[^"]*"[^>]*>/g, '')
93+
.replace(/(<script src="\.\.\/[^"]*"[^>]*) integrity="[^"]*"/g, '$1')
9494
new sh.ShellString(fileContents).to(file)
9595
}
9696

0 commit comments

Comments
 (0)