Skip to content

Commit

Permalink
add review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Skalakid committed Nov 17, 2023
1 parent a09e11a commit 6dbece8
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/ExpensiMark.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<a href="${href}">${label}</a>`;
const formattedLabel = label === href ? g2 : label;
return `<a href="${href}">${formattedLabel}</a>`;
},
},

Expand Down

0 comments on commit 6dbece8

Please sign in to comment.