File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 1
- import { componentPlugin } from '@mdit-vue/plugin-component'
1
+ import {
2
+ componentPlugin ,
3
+ type ComponentPluginOptions
4
+ } from '@mdit-vue/plugin-component'
2
5
import {
3
6
frontmatterPlugin ,
4
7
type FrontmatterPluginOptions
@@ -52,6 +55,7 @@ export interface MarkdownOptions extends MarkdownIt.Options {
52
55
toc ?: TocPluginOptions
53
56
externalLinks ?: Record < string , string >
54
57
cache ?: boolean
58
+ component ?: ComponentPluginOptions
55
59
}
56
60
57
61
export type MarkdownRenderer = MarkdownIt
@@ -86,7 +90,7 @@ export const createMarkdownRenderer = async (
86
90
}
87
91
88
92
// custom plugins
89
- md . use ( componentPlugin )
93
+ md . use ( componentPlugin , { ... options . component } )
90
94
. use ( highlightLinePlugin )
91
95
. use ( preWrapperPlugin , { hasSingleTheme } )
92
96
. use ( snippetPlugin , srcDir )
You can’t perform that action at this time.
0 commit comments