Skip to content

Commit

Permalink
Merge pull request ChatGPTNextWeb#5377 from ConnectAI-E/hotfix/mermaid
Browse files Browse the repository at this point in the history
hotfix Mermaid can not render. close ChatGPTNextWeb#5374
  • Loading branch information
lloydzhou authored Sep 7, 2024
2 parents fe5a4f4 + cf0c057 commit 116a73d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/components/markdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ export function PreCode(props: { children: any }) {
);
}

function CustomCode(props: { children: any }) {
function CustomCode(props: { children: any; className?: string }) {
const ref = useRef<HTMLPreElement>(null);
const [collapsed, setCollapsed] = useState(true);
const [showToggle, setShowToggle] = useState(false);
Expand All @@ -182,6 +182,7 @@ function CustomCode(props: { children: any }) {
return (
<>
<code
className={props?.className}
ref={ref}
style={{
maxHeight: collapsed ? "400px" : "none",
Expand Down

0 comments on commit 116a73d

Please sign in to comment.