feat: complete v0.6 content and attachment experience
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import ReactMarkdown from "react-markdown";
|
||||
import rehypeHighlight from "rehype-highlight";
|
||||
import remarkGfm from "remark-gfm";
|
||||
import { withoutInlineTags } from "@/lib/tags";
|
||||
|
||||
/** 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>;
|
||||
export function Markdown({ content, tags = [], compact = false }: { content: string; tags?: string[]; compact?: boolean }) {
|
||||
return <div className={`markdown${compact ? " markdown-compact" : ""}`}><ReactMarkdown remarkPlugins={[remarkGfm]} rehypePlugins={[rehypeHighlight]}>{withoutInlineTags(content, tags)}</ReactMarkdown></div>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user