Skip to content

Commit 2454f58

Browse files
author
Bogdan Tsechoev
committed
Merge branch 'bot_ui_debug_messages_links' into 'master'
Bot UI: Debug messages links fix See merge request postgres-ai/database-lab!897
2 parents 383aa49 + e74f840 commit 2454f58

File tree

1 file changed

+2
-2
lines changed
  • ui/packages/platform/src/pages/Bot

1 file changed

+2
-2
lines changed

ui/packages/platform/src/pages/Bot/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ export const createMessageFragment = (messages: DebugMessage[]): DocumentFragmen
3737

3838
messages.forEach((item) => {
3939
const textBeforeLink = `[${item.created_at}]: `;
40-
const parts = item.content.split(/(https?:\/\/[^\s]+)/g);
40+
const parts = item.content.split(/(https?:\/\/[^\s)"']+)/g);
4141

4242
const messageContent = parts.map((part) => {
43-
if (/https?:\/\/[^\s]+/.test(part)) {
43+
if(/https?:\/\/[^\s)"']+/.test(part)) {
4444
const link = document.createElement('a');
4545
link.href = part;
4646
link.target = '_blank';

0 commit comments

Comments
 (0)