fix: not acting immediately
This commit is contained in:
parent
bfce358f9e
commit
b2e0522b59
|
|
@ -43,7 +43,7 @@ watch([style, codeConfig], async () => {
|
|||
catch (err) {
|
||||
console.error(err)
|
||||
}
|
||||
}, { immediate: true })
|
||||
}, { immediate: true, deep: true })
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,8 @@ export default function (md: MarkdownRenderer) {
|
|||
md.renderer.rules.fence = function (tokens, idx, options, env, self) {
|
||||
// Check if this is a code block
|
||||
const token = tokens[idx]
|
||||
if (token && token.tag === 'code' && token.info) {
|
||||
const isAllowedExtension = (token.info.includes('vue') || token.info.includes('astro') || token.info.includes('ts'))
|
||||
if (token && token.tag === 'code' && isAllowedExtension) {
|
||||
// Wrap the code block in CodeWrapper
|
||||
return `<CodeWrapper>${defaultFenceRenderer(tokens, idx, options, env, self)}</CodeWrapper>`
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,6 @@
|
|||
"outDir": "dist",
|
||||
"sourceMap": true
|
||||
},
|
||||
"include": ["src", ".vitepress/**/*.vue", "scripts/build-registry.ts", ".vitepress/**/*.mts", ".vitepress/**/*.vue", "src/lib/**/*"],
|
||||
"include": ["src", ".vitepress/**/*.vue", "scripts/build-registry.ts", ".vitepress/**/*.mts", ".vitepress/**/*.ts", "src/lib/**/*"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user