Skip to content

Commit 116a73d

Browse files
authored
Merge pull request #5377 from ConnectAI-E/hotfix/mermaid
hotfix Mermaid can not render. close #5374
2 parents fe5a4f4 + cf0c057 commit 116a73d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

app/components/markdown.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ export function PreCode(props: { children: any }) {
163163
);
164164
}
165165

166-
function CustomCode(props: { children: any }) {
166+
function CustomCode(props: { children: any; className?: string }) {
167167
const ref = useRef<HTMLPreElement>(null);
168168
const [collapsed, setCollapsed] = useState(true);
169169
const [showToggle, setShowToggle] = useState(false);
@@ -182,6 +182,7 @@ function CustomCode(props: { children: any }) {
182182
return (
183183
<>
184184
<code
185+
className={props?.className}
185186
ref={ref}
186187
style={{
187188
maxHeight: collapsed ? "400px" : "none",

0 commit comments

Comments
 (0)