feat: complete v0.3 reading and discovery experience
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
import ReactMarkdown from "react-markdown";
|
||||
import rehypeHighlight from "rehype-highlight";
|
||||
import remarkGfm from "remark-gfm";
|
||||
|
||||
/** Raw HTML is intentionally not enabled, so Memos content cannot inject script or markup. */
|
||||
export function Markdown({ content, compact = false }: { content: string; compact?: boolean }) {
|
||||
return <div className={`markdown${compact ? " markdown-compact" : ""}`}><ReactMarkdown remarkPlugins={[remarkGfm]} rehypePlugins={[rehypeHighlight]}>{content}</ReactMarkdown></div>;
|
||||
}
|
||||
Reference in New Issue
Block a user