fix: Use textContent for code block conversion to prevent content loss

Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
2025-12-03 03:51:33 +00:00
parent 5ebe87dbc2
commit b1b2be6080

View File

@@ -69,8 +69,8 @@ function Article({ cache }) {
if (pConv.includes(key)) { if (pConv.includes(key)) {
return ( return (
<React.Fragment key={key}> <React.Fragment key={key}>
{v.innerHTML.split('\n\n').map((x, i) => {v.textContent.split('\n\n').map((x, i) =>
<p key={i} dangerouslySetInnerHTML={{ __html: x }} /> <p key={i}>{x}</p>
)} )}
</React.Fragment> </React.Fragment>
); );