Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/components/ChatInput/ChatInput.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ const labels = {

const convertMentionsToHTMLAndPlainText = ({ suggestions, value }) => {
const mentionsRegex = new RegExp(/@\[[^)]*\)/g);
let html = `<p>${value}</p>`;
let html = `<p>${value.replace(/\n/g, "<br>")}</p>`; // Replace newlines with <br> for HTML output
let plainText = value;
const allMentions = html.matchAll(mentionsRegex);

Expand All @@ -140,7 +140,6 @@ const convertMentionsToHTMLAndPlainText = ({ suggestions, value }) => {

return { html, plainText };
};

export const ChatInput = forwardRef(
(
{
Expand Down
Loading