Files
penx/apps/web/lib/remark-slate/plugin.ts
0xzio 3edfe1aebf refactor: use monorepo
fix: fix build

chore: update README

feat: init extension

fix: fix web build
2025-04-19 01:48:59 +08:00

12 lines
312 B
TypeScript

import { MdastNode, OptionType } from './ast-types'
import transform from './deserialize'
export default function plugin(opts?: OptionType) {
const compiler = (node: { children: Array<MdastNode> }) => {
return node.children.map((c) => transform(c, opts))
}
// @ts-ignore
this.Compiler = compiler
}