"@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",
"@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",
// 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() {
codeSnippet.className = 'language-html'
codeSnippet.textContent = htmlCode
-
- if (typeof window !== 'undefined' && (window as any).Prism) {
- (window as any).Prism.highlightElement(codeSnippet)
- }
}
// Initialize placement dropdown
codeSnippet.className = 'language-html'
codeSnippet.textContent = htmlCode
-
- if (typeof window !== 'undefined' && (window as any).Prism) {
- (window as any).Prism.highlightElement(codeSnippet)
- }
}
// Initialize dropdown
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() {