feat: complete v0.3 reading and discovery experience

This commit is contained in:
2026-07-19 03:16:18 +08:00
parent 5b5129fad5
commit 9ab09159e3
23 changed files with 1829 additions and 26 deletions
+8
View File
@@ -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>;
}