feat: ai's first take...
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import { Marked } from 'marked';
|
||||
import { createDirectives } from 'marked-directive';
|
||||
|
||||
// 使用 marked-directive 来支持通过 @solidjs/element 添加的 UI 组件
|
||||
const marked = new Marked().use(createDirectives());
|
||||
|
||||
export function parseMarkdown(content: string): string {
|
||||
return marked.parse(content) as string;
|
||||
}
|
||||
|
||||
export { marked };
|
||||
Reference in New Issue
Block a user