From 15a2f6841c891d9a290939371e0bc5531d6d5fe6 Mon Sep 17 00:00:00 2001 From: Arjona99 Date: Wed, 17 May 2023 16:13:56 -0600 Subject: [PATCH 1/2] Replace \\n for \n tu support line break formatting --- .../shared/components/ChatOptions.vue | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/app/javascript/shared/components/ChatOptions.vue b/app/javascript/shared/components/ChatOptions.vue index d73e00c5bcd82..e9b0a51283f95 100644 --- a/app/javascript/shared/components/ChatOptions.vue +++ b/app/javascript/shared/components/ChatOptions.vue @@ -1,13 +1,10 @@ @@ -22,6 +19,12 @@ export default { default: '', }, }, + computed: { + formattedMessage() { + const messageWithLineBreak = this.message.replace(/\\n/g,'\n') + return this.formatMessage(messageWithLineBreak) + } + } }; From 292d377bce7d32959e0307df9b9b7385628d6e71 Mon Sep 17 00:00:00 2001 From: Arjona99 Date: Wed, 17 May 2023 16:17:20 -0600 Subject: [PATCH 2/2] solve merge conflicts --- app/javascript/shared/components/ChatOptions.vue | 5 +++-- app/javascript/widget/components/AgentMessageBubble.vue | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/javascript/shared/components/ChatOptions.vue b/app/javascript/shared/components/ChatOptions.vue index e9b0a51283f95..2f93658f547ea 100644 --- a/app/javascript/shared/components/ChatOptions.vue +++ b/app/javascript/shared/components/ChatOptions.vue @@ -10,11 +10,12 @@