Skip to content

Commit

Permalink
refactor(chat): code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
YYYasin19 committed Jan 21, 2024
1 parent ae63373 commit 961ce7b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/www/registry/default/ui/chat/markdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ export default function Markdown({ content }: { content: string }) {
</code>
)
},
pre({ node, className, ...props }) {
pre({ node, className, children, ...props }) {
const match = /language-(\w+)/.exec(className || "")

return (
<CodeBlock
key={Math.random()}
language={(match && match[1]) || ""}
value={String(props.children).replace(/\n$/, "")}
value={String(children).replace(/\n$/, "")}
{...props}
/>
)
Expand Down

0 comments on commit 961ce7b

Please sign in to comment.