fix(markdown): single returns would be rendered as spaces

This commit is contained in:
Tom (plebeius.eth)
2024-08-26 11:10:57 +02:00
parent 449cd967ec
commit 495e9e25b5
+1 -1
View File
@@ -159,7 +159,7 @@ const Markdown = ({ content, title }: MarkdownProps) => {
</span> </span>
)} )}
<ReactMarkdown <ReactMarkdown
children={content} children={content.replace(/\n/g, '\n\n')} // single newlines would be rendered as spaces
remarkPlugins={remarkPlugins} remarkPlugins={remarkPlugins}
rehypePlugins={[[rehypeSanitize, customSchema]]} rehypePlugins={[[rehypeSanitize, customSchema]]}
components={{ components={{