fix(markdown): users couldn't include empty lines in the post content

This commit is contained in:
Tom (plebeius.eth)
2024-08-26 13:52:00 +02:00
parent 4092b68a74
commit 38790a2596
3 changed files with 13 additions and 4 deletions
+1 -1
View File
@@ -154,7 +154,7 @@ const ReplyModal = ({ closeModal, showReplyModal, parentCid, postCid, scrollY, s
};
const handleContentChange = (e: React.ChangeEvent<HTMLTextAreaElement>) => {
const contentWithoutPrefix = e.target.value.slice(contentPrefix.length).replace(/\n/g, '\n\n');
const contentWithoutPrefix = e.target.value.slice(contentPrefix.length);
if (textRef.current && textRef.current.value !== contentWithoutPrefix) {
setPublishReplyOptions({ content: contentWithoutPrefix });
}