From 6dbece87ae78cc19783e57e801de2e7649426295 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Ska=C5=82ka?= Date: Fri, 17 Nov 2023 09:35:28 +0100 Subject: [PATCH] add review changes --- lib/ExpensiMark.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/ExpensiMark.js b/lib/ExpensiMark.js index 73b6bcfc..3c8a2b44 100644 --- a/lib/ExpensiMark.js +++ b/lib/ExpensiMark.js @@ -68,12 +68,10 @@ export default class ExpensiMark { if (g1.match(CONST.REG_EXP.EMOJIS) || !g1.trim()) { return match; } - let label = g1.trim(); + const label = g1.trim(); const href = `mailto:${g2}`; - if (label === href) { - label = g2; - } - return `${label}`; + const formattedLabel = label === href ? g2 : label; + return `${formattedLabel}`; }, },