]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Fix HTML head content built from 'Download examples' button (#41468)
authorJulien Déramond <juderamond@gmail.com>
Mon, 19 May 2025 19:52:34 +0000 (21:52 +0200)
committerGitHub <noreply@github.com>
Mon, 19 May 2025 19:52:34 +0000 (12:52 -0700)
build/zip-examples.mjs

index e2b5245f19405889bd81d1f6a2d28d38bb89a773..03995efd530b1bcdbcc119bf0e30715fd90ae929 100644 (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)
 }