|
|
@ -44,7 +44,7 @@ export interface MarkdownOptions extends MarkdownIt.Options {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
defaultHighlightLang?: string
|
|
|
|
defaultHighlightLang?: string
|
|
|
|
frontmatter?: FrontmatterPluginOptions
|
|
|
|
frontmatter?: FrontmatterPluginOptions
|
|
|
|
headers?: HeadersPluginOptions | false
|
|
|
|
headers?: HeadersPluginOptions | boolean
|
|
|
|
sfc?: SfcPluginOptions
|
|
|
|
sfc?: SfcPluginOptions
|
|
|
|
theme?: ThemeOptions
|
|
|
|
theme?: ThemeOptions
|
|
|
|
languages?: ILanguageRegistration[]
|
|
|
|
languages?: ILanguageRegistration[]
|
|
|
@ -120,11 +120,11 @@ export const createMarkdownRenderer = async (
|
|
|
|
...options.frontmatter
|
|
|
|
...options.frontmatter
|
|
|
|
} as FrontmatterPluginOptions)
|
|
|
|
} as FrontmatterPluginOptions)
|
|
|
|
|
|
|
|
|
|
|
|
if (options.headers !== false) {
|
|
|
|
if (options.headers) {
|
|
|
|
md.use(headersPlugin, {
|
|
|
|
md.use(headersPlugin, {
|
|
|
|
level: [2, 3, 4, 5, 6],
|
|
|
|
level: [2, 3, 4, 5, 6],
|
|
|
|
slugify,
|
|
|
|
slugify,
|
|
|
|
...options.headers
|
|
|
|
...(typeof options.headers === 'boolean' ? undefined : options.headers)
|
|
|
|
} as HeadersPluginOptions)
|
|
|
|
} as HeadersPluginOptions)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|