From a6383664baff98e82e70765997a2b7deaa065235 Mon Sep 17 00:00:00 2001 From: kamtschatka Date: Sat, 13 Jul 2024 12:14:40 +0200 Subject: [PATCH] [Feature Request] inside an item, add the Memos "checkbox" feature to do a check list into an item #300 added the possibility to add checkboxes --- .../components/dashboard/bookmarks/BookmarkedTextViewer.tsx | 5 ++++- apps/web/components/ui/markdown-component.tsx | 2 ++ apps/web/package.json | 1 + pnpm-lock.yaml | 3 +++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/apps/web/components/dashboard/bookmarks/BookmarkedTextViewer.tsx b/apps/web/components/dashboard/bookmarks/BookmarkedTextViewer.tsx index 8a620341..88382cf7 100644 --- a/apps/web/components/dashboard/bookmarks/BookmarkedTextViewer.tsx +++ b/apps/web/components/dashboard/bookmarks/BookmarkedTextViewer.tsx @@ -1,5 +1,6 @@ import { Dialog, DialogContent } from "@/components/ui/dialog"; import Markdown from "react-markdown"; +import remarkGfm from "remark-gfm"; export function BookmarkedTextViewer({ content, @@ -13,7 +14,9 @@ export function BookmarkedTextViewer({ return ( - {content} + + {content} + ); diff --git a/apps/web/components/ui/markdown-component.tsx b/apps/web/components/ui/markdown-component.tsx index f92cb3a3..d567ddb3 100644 --- a/apps/web/components/ui/markdown-component.tsx +++ b/apps/web/components/ui/markdown-component.tsx @@ -4,6 +4,7 @@ import { cn } from "@/lib/utils"; import Markdown from "react-markdown"; import { Prism as SyntaxHighlighter } from "react-syntax-highlighter"; import { dracula } from "react-syntax-highlighter/dist/cjs/styles/prism"; +import remarkGfm from "remark-gfm"; function PreWithCopyBtn({ className, ...props }: React.ComponentProps<"pre">) { const ref = React.useRef(null); @@ -27,6 +28,7 @@ export function MarkdownComponent({ }) { return (