Add API layer, Zustand store, markdown renderer, types
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import { marked } from 'marked';
|
||||
|
||||
marked.setOptions({
|
||||
breaks: true,
|
||||
gfm: true,
|
||||
});
|
||||
|
||||
export function renderMarkdown(text: string): string {
|
||||
if (!text) return '';
|
||||
return marked.parse(text) as string;
|
||||
}
|
||||
Reference in New Issue
Block a user