ttcMD: Added line breaks to text elements

This commit is contained in:
2024-03-12 19:54:51 -06:00
parent d04e374231
commit 32eb0c7408
3 changed files with 45 additions and 3 deletions

View File

@@ -141,7 +141,11 @@ function render(token: Token, usedIds: string[]) {
</Poppable>
);
case "text":
return <span>{token.content}</span>;
return (
<span className="whitespace-pre-wrap">
{token.content.replaceAll("\\n", "\n")}
</span>
);
case "p":
return (
<div className="p">