|
|
@ -53,11 +53,11 @@ export interface MarkdownOptions extends Options {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Setup markdown-it instance before applying plugins
|
|
|
|
* Setup markdown-it instance before applying plugins
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
preConfig?: (md: MarkdownIt) => void
|
|
|
|
preConfig?: (md: MarkdownIt) => Awaited<void>
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Setup markdown-it instance
|
|
|
|
* Setup markdown-it instance
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
config?: (md: MarkdownIt) => void
|
|
|
|
config?: (md: MarkdownIt) => Awaited<void>
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Disable cache (experimental)
|
|
|
|
* Disable cache (experimental)
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -229,7 +229,7 @@ export async function createMarkdownRenderer(
|
|
|
|
md.use(restoreEntities)
|
|
|
|
md.use(restoreEntities)
|
|
|
|
|
|
|
|
|
|
|
|
if (options.preConfig) {
|
|
|
|
if (options.preConfig) {
|
|
|
|
options.preConfig(md)
|
|
|
|
await options.preConfig(md)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// custom plugins
|
|
|
|
// custom plugins
|
|
|
@ -322,7 +322,7 @@ export async function createMarkdownRenderer(
|
|
|
|
|
|
|
|
|
|
|
|
// apply user config
|
|
|
|
// apply user config
|
|
|
|
if (options.config) {
|
|
|
|
if (options.config) {
|
|
|
|
options.config(md)
|
|
|
|
await options.config(md)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return md
|
|
|
|
return md
|
|
|
|