diff --git a/components/code-block.tsx b/components/code-block.tsx index c0780e5..336a1ca 100644 --- a/components/code-block.tsx +++ b/components/code-block.tsx @@ -1,20 +1,18 @@ 'use client'; interface CodeBlockProps { - node: any; - inline: boolean; - className: string; - children: any; + node?: any; + className?: string; + children?: any; } export function CodeBlock({ node, - inline, className, children, ...props }: CodeBlockProps) { - if (!inline) { + if (node?.children[0]?.value?.endsWith('\n')) { return (
 = {
-  // @ts-expect-error
   code: CodeBlock,
   pre: ({ children }) => <>{children},
   ol: ({ node, children, ...props }) => {