Removed markdown to not cause problems

This commit is contained in:
Lucas Oliveira 2024-06-23 16:31:49 -03:00 • committed by Gabriel Luiz Freitas Almeida
commit a8c474588c

View file

@ -186,7 +186,7 @@ export default function ChatMessage({
/> />
) : ( ) : (
<Markdown <Markdown
remarkPlugins={[remarkGfm, remarkMath]} remarkPlugins={[remarkGfm]}
rehypePlugins={[rehypeMathjax]} rehypePlugins={[rehypeMathjax]}
className={cn( className={cn(
"markdown prose flex flex-col word-break-break-word dark:prose-invert", "markdown prose flex flex-col word-break-break-word dark:prose-invert",
@ -205,6 +205,7 @@ export default function ChatMessage({
children, children,
...props ...props
}) => { }) => {
if(typeof children === "string"){
if ((children as string)!.length) { if ((children as string)!.length) {
if (children![0] === "▍") { if (children![0] === "▍") {
return ( return (
@ -213,11 +214,11 @@ export default function ChatMessage({
</span> </span>
); );
} }
children![0] = ( children![0] = (
children![0] as string children![0] as string
).replace("`▍`", "▍"); ).replace("`▍`", "▍");
} }
}
const match = /language-(\w+)/.exec( const match = /language-(\w+)/.exec(
className || "", className || "",