From bacd0b5423fcf0072209b358b5b3ff0160edbeae Mon Sep 17 00:00:00 2001 From: ShimaginAndrey Date: Mon, 26 Apr 2021 09:20:52 +0300 Subject: [PATCH] Fix Bug 47237 modification --- apps/common/mobile/lib/view/collaboration/Comments.jsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/common/mobile/lib/view/collaboration/Comments.jsx b/apps/common/mobile/lib/view/collaboration/Comments.jsx index 11cfa7dfd..e38997bcf 100644 --- a/apps/common/mobile/lib/view/collaboration/Comments.jsx +++ b/apps/common/mobile/lib/view/collaboration/Comments.jsx @@ -685,6 +685,10 @@ const CommentList = inject("storeComments", "storeAppOptions")(observer(({storeC } }; + let arrayComments = [] + comment.comment && comment.comment.replace(/((?:https?:\/\/|ftps?:\/\/|\bwww\.)(?:(?![.,?!;:()]*(?:\s|$))[^\s]){2,})|(\n+|(?:(?!(?:https?:\/\/|ftp:\/\/|\bwww\.)(?:(?![.,?!;:()]*(?:\s|$))[^\s]){2,}).)+)/gim, + (match, link, text) => {console.log(match); arrayComments.push(link ? window.open(link)} href={(link[0]==="w" ? "//" : "") + link} key={arrayComments.length}>{link} + : text)}) return ( @@ -718,9 +722,7 @@ const CommentList = inject("storeComments", "storeAppOptions")(observer(({storeC
{comment.quote &&
{sliceQuote(comment.quote)}
} -
{ (comment.comment).includes('https://')? - window.open(comment.comment)}>{comment.comment} : -
{comment.comment}
}
+
{arrayComments}
{comment.replies.length > 0 &&
    {comment.replies.map((reply, indexReply) => {