mirror of
https://github.com/pengzhanbo/vuepress-theme-plume.git
synced 2026-04-23 10:58:13 +08:00
23 lines
536 B
TypeScript
23 lines
536 B
TypeScript
import type { Markdown } from 'vuepress/markdown'
|
|
import type { MarkdownPowerPluginOptions } from '../../shared/index.js'
|
|
import { iconsPlugin } from './icons.js'
|
|
import { plotPlugin } from './plot.js'
|
|
|
|
export function inlineSyntaxPlugin(
|
|
md: Markdown,
|
|
options: MarkdownPowerPluginOptions,
|
|
): void {
|
|
if (options.icons) {
|
|
// :[collect:name]:
|
|
md.use(iconsPlugin)
|
|
}
|
|
|
|
if (
|
|
options.plot === true
|
|
|| (typeof options.plot === 'object' && options.plot.tag !== false)
|
|
) {
|
|
// !!plot!!
|
|
md.use(plotPlugin)
|
|
}
|
|
}
|