From 051771397cbab7b78f2b8fdcc6b052dec1db9c64 Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Tue, 11 May 2021 13:59:45 +0530 Subject: [PATCH] Fix bug in which links preceeded text Signed-off-by: RMidhunSuresh --- src/domain/session/room/timeline/linkify.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/domain/session/room/timeline/linkify.js b/src/domain/session/room/timeline/linkify.js index 01dc8a4b..628d8c68 100644 --- a/src/domain/session/room/timeline/linkify.js +++ b/src/domain/session/room/timeline/linkify.js @@ -3,8 +3,8 @@ export function linkify(text, callback) { const matches = text.matchAll(regex); let curr = 0; for (let match of matches) { - callback(match[0], true); callback(text.slice(curr, match.index), false); + callback(match[0], true); const len = match[0].length; curr = match.index + len; }