We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
markdown.preConfig
1 parent 7141b82 commit ce85726Copy full SHA for ce85726
src/node/markdown/markdown.ts
@@ -34,6 +34,7 @@ export type ThemeOptions =
34
35
export interface MarkdownOptions extends MarkdownIt.Options {
36
lineNumbers?: boolean
37
+ preConfig?: (md: MarkdownIt) => void
38
config?: (md: MarkdownIt) => void
39
anchor?: anchorPlugin.AnchorOptions
40
attrs?: {
@@ -76,10 +77,14 @@ export const createMarkdownRenderer = async (
76
77
logger
78
)),
79
...options
- }) as MarkdownRenderer
80
+ })
81
82
md.linkify.set({ fuzzyLink: false })
83
84
+ if (options.preConfig) {
85
+ options.preConfig(md)
86
+ }
87
+
88
// custom plugins
89
md.use(componentPlugin)
90
.use(highlightLinePlugin)
0 commit comments