aboutsummaryrefslogtreecommitdiffstats
path: root/apps/web/components/ui/markdown-component.tsx
diff options
context:
space:
mode:
authorkamtschatka <simon.schatka@gmx.at>2024-07-15 01:11:27 +0200
committerGitHub <noreply@github.com>2024-07-15 00:11:27 +0100
commit888dad6ec2f3c78676422ad503dcf7ff81507552 (patch)
tree9d1ef3d32b8f7c189cf8ec0b2943e53b8cd18efd /apps/web/components/ui/markdown-component.tsx
parentf77a41a75237b8c816e0c9ca7217dfacc32cc7d0 (diff)
downloadkarakeep-888dad6ec2f3c78676422ad503dcf7ff81507552.tar.zst
feature: Add github markdown support which includes tables, checklists and auto links #300 (#302)
added the possibility to add checkboxes
Diffstat (limited to 'apps/web/components/ui/markdown-component.tsx')
-rw-r--r--apps/web/components/ui/markdown-component.tsx2
1 files changed, 2 insertions, 0 deletions
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<HTMLPreElement>(null);
@@ -27,6 +28,7 @@ export function MarkdownComponent({
}) {
return (
<Markdown
+ remarkPlugins={[remarkGfm]}
className="prose dark:prose-invert"
components={{
pre({ ...props }) {