From: Julien Déramond Date: Tue, 17 Mar 2026 19:18:51 +0000 (+0100) Subject: Remove remaining Prism usage (#42193) X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0bf0c536fa73a6128caf383bf2bd15558d507cf2;p=thirdparty%2Fbootstrap.git Remove remaining Prism usage (#42193) --- diff --git a/package-lock.json b/package-lock.json index 635bed3537..562d2c10ba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,6 @@ "@astrojs/check": "^0.9.6", "@astrojs/markdown-remark": "^6.3.10", "@astrojs/mdx": "^4.3.13", - "@astrojs/prism": "^3.3.0", "@astrojs/sitemap": "^3.6.0", "@babel/cli": "^7.28.3", "@babel/core": "^7.28.5", diff --git a/package.json b/package.json index adbd6fb620..f168b171c1 100644 --- a/package.json +++ b/package.json @@ -122,7 +122,6 @@ "@astrojs/check": "^0.9.6", "@astrojs/markdown-remark": "^6.3.10", "@astrojs/mdx": "^4.3.13", - "@astrojs/prism": "^3.3.0", "@astrojs/sitemap": "^3.6.0", "@babel/cli": "^7.28.3", "@babel/core": "^7.28.5", diff --git a/site/src/components/shortcodes/ButtonPlayground.astro b/site/src/components/shortcodes/ButtonPlayground.astro index e46b5585b3..103dda9de3 100644 --- a/site/src/components/shortcodes/ButtonPlayground.astro +++ b/site/src/components/shortcodes/ButtonPlayground.astro @@ -206,12 +206,6 @@ const rounded = ['default', 'pill', 'square'] // Update the code content codeSnippet.className = 'language-html' codeSnippet.textContent = htmlCode - - // Trigger Prism highlighting if available - // Prism from @astrojs/prism is server-side, but we can try to use Prism.js if loaded - if (typeof window !== 'undefined' && (window as any).Prism) { - (window as any).Prism.highlightElement(codeSnippet) - } } function updateButtons() { diff --git a/site/src/components/shortcodes/DropdownPlacementPlayground.astro b/site/src/components/shortcodes/DropdownPlacementPlayground.astro index 8971fa4da3..f8ef8ec392 100644 --- a/site/src/components/shortcodes/DropdownPlacementPlayground.astro +++ b/site/src/components/shortcodes/DropdownPlacementPlayground.astro @@ -193,10 +193,6 @@ const logicalPlacements = [ codeSnippet.className = 'language-html' codeSnippet.textContent = htmlCode - - if (typeof window !== 'undefined' && (window as any).Prism) { - (window as any).Prism.highlightElement(codeSnippet) - } } // Initialize placement dropdown diff --git a/site/src/components/shortcodes/NavbarPlacementPlayground.astro b/site/src/components/shortcodes/NavbarPlacementPlayground.astro index f374f301fe..8c40ced3f6 100644 --- a/site/src/components/shortcodes/NavbarPlacementPlayground.astro +++ b/site/src/components/shortcodes/NavbarPlacementPlayground.astro @@ -122,10 +122,6 @@ const placements = [ codeSnippet.className = 'language-html' codeSnippet.textContent = htmlCode - - if (typeof window !== 'undefined' && (window as any).Prism) { - (window as any).Prism.highlightElement(codeSnippet) - } } // Initialize dropdown diff --git a/site/src/components/shortcodes/StepperPlayground.astro b/site/src/components/shortcodes/StepperPlayground.astro index cdf4f5ffe9..e30c7cf1a8 100644 --- a/site/src/components/shortcodes/StepperPlayground.astro +++ b/site/src/components/shortcodes/StepperPlayground.astro @@ -254,10 +254,6 @@ const stepCounts = [3, 4, 5, 6] const htmlCode = generateHTML() codeSnippet.className = 'language-html' codeSnippet.textContent = htmlCode - - if (typeof window !== 'undefined' && (window as any).Prism) { - (window as any).Prism.highlightElement(codeSnippet) - } } function updateActiveDropdown() {