Skip to content

Commit 38f806a

Browse files
committed
fix: resolve linting and formatting issues in Mermaid theme
- Fix Prettier formatting issues in theme/index.ts - Resolve ESLint errors with proper code formatting - All linting and formatting now passes successfully - VitePress build continues to work properly
1 parent 6a99286 commit 38f806a

1 file changed

Lines changed: 17 additions & 7 deletions

File tree

docs/.vitepress/theme/index.ts

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,27 +33,37 @@ export default {
3333
let mermaidElements = document.querySelectorAll(
3434
'pre code.language-mermaid'
3535
)
36-
36+
3737
// If not found, try alternative selectors
3838
if (mermaidElements.length === 0) {
39-
mermaidElements = document.querySelectorAll('code.language-mermaid')
39+
mermaidElements = document.querySelectorAll(
40+
'code.language-mermaid'
41+
)
4042
}
4143
if (mermaidElements.length === 0) {
42-
mermaidElements = document.querySelectorAll('pre[class*="language-mermaid"] code')
44+
mermaidElements = document.querySelectorAll(
45+
'pre[class*="language-mermaid"] code'
46+
)
4347
}
4448
if (mermaidElements.length === 0) {
45-
mermaidElements = document.querySelectorAll('[class*="language-mermaid"]')
49+
mermaidElements = document.querySelectorAll(
50+
'[class*="language-mermaid"]'
51+
)
4652
}
47-
53+
4854
console.log(
4955
`Found ${mermaidElements.length} mermaid diagrams to render`
5056
)
51-
57+
5258
// Debug: log all code blocks to see what's available
5359
const allCodeBlocks = document.querySelectorAll('pre code')
5460
console.log(`Total code blocks found: ${allCodeBlocks.length}`)
5561
allCodeBlocks.forEach((block, i) => {
56-
console.log(`Code block ${i}:`, block.className, block.textContent?.substring(0, 30) + '...')
62+
console.log(
63+
`Code block ${i}:`,
64+
block.className,
65+
block.textContent?.substring(0, 30) + '...'
66+
)
5767
})
5868

5969
for (let i = 0; i < mermaidElements.length; i++) {

0 commit comments

Comments
 (0)