-
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
Welcome @kartikm7! 👋 Could you share a runnable example of what you're seeing, ideally in a sandbox? I see a number of modifications in your code like tailwind and most custom elements which could be related. |
Beta Was this translation helpful? Give feedback.
-
Hey @ChristianMurphy thank you so much for the prompt reply! So val.content is the value that comes from the llm here's a log of what it does: I am using custom components in react markdown just for links and codeblocks(although the problem I face is here).
Also thought I'd share my devDependencies: Could it be the vite version? Thanks in advance man, thank you for giving your time to my query! |
Beta Was this translation helpful? Give feedback.
-
Just found a solution!
this got it working for me!
|
Beta Was this translation helpful? Give feedback.
-
Hi @ChristianMurphy ! I actually just figured out why I needed to serialize, this was because I was using both Thank you so much for being kind, and trying to help me out here! |
Beta Was this translation helpful? Give feedback.
Hi @ChristianMurphy ! I actually just figured out why I needed to serialize, this was because I was using both
rehype-highlight
andreact-syntax-highlighter
. So this is what I think must be happening,rehype-highlight
would pre-process the code block and convert some of the string to React Nodes and when I'd convert thechildren
prop of the code-block to String and drill the prop to my custom Code component(which usesreact-syntax-highlighter)
that would causereact-syntax-highlighter
to get a string with[object Object]
. Removingrehype-highlight
fixed this issue for me.Thank you so much for being kind, and trying to help me out here!