mirror of
https://github.com/spacebarchat/client.git
synced 2024-11-22 02:12:38 +01:00
fix another p tag issue
This commit is contained in:
parent
9d4b82a761
commit
42acb28f20
@ -128,7 +128,12 @@ const customRenderer: Partial<ReactRenderer> = {
|
||||
link: (href, text) => <Link href={href}>{text}</Link>,
|
||||
// prevent renderer from wrapping everything in a <p> tag
|
||||
paragraph: (content: React.ReactNode[]) => {
|
||||
if (content.length === 1 && Array.isArray(content[0]) && typeof content[0][0] === "string") {
|
||||
if (
|
||||
content.length === 1 &&
|
||||
Array.isArray(content[0]) &&
|
||||
content[0].length === 1 &&
|
||||
typeof content[0][0] === "string"
|
||||
) {
|
||||
return <p>{content}</p>;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user