From d8480758d6ed4af4ff9d9f042b6fc1ff1039716f Mon Sep 17 00:00:00 2001 From: Arvin Xu Date: Mon, 10 Feb 2025 10:26:41 +0800 Subject: [PATCH] =?UTF-8?q?=20=F0=9F=92=84=20style:=20support=20Mermaid=20?= =?UTF-8?q?in=20Artifacts=20(#5947)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/features/Portal/Artifacts/Body/Renderer/index.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/features/Portal/Artifacts/Body/Renderer/index.tsx b/src/features/Portal/Artifacts/Body/Renderer/index.tsx index 8f4945ae06895..0c5300eb1f891 100644 --- a/src/features/Portal/Artifacts/Body/Renderer/index.tsx +++ b/src/features/Portal/Artifacts/Body/Renderer/index.tsx @@ -1,4 +1,4 @@ -import { Markdown } from '@lobehub/ui'; +import { Markdown, Mermaid } from '@lobehub/ui'; import dynamic from 'next/dynamic'; import { memo } from 'react'; @@ -17,6 +17,10 @@ const Renderer = memo<{ content: string; type?: string }>(({ content, type }) => return ; } + case 'application/lobe.artifacts.mermaid': { + return {content}; + } + case 'text/markdown': { return {content}; }