expensify-common 2.0.10 → 2.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ExpensiMark.js +4 -1
- package/package.json +2 -2
package/dist/ExpensiMark.js
CHANGED
|
@@ -213,7 +213,10 @@ class ExpensiMark {
|
|
|
213
213
|
return `${g1}<mention-user>${g2}${phoneRegex.test(g2) ? `@${Constants.CONST.SMS.DOMAIN}` : ''}</mention-user>`;
|
|
214
214
|
},
|
|
215
215
|
rawInputReplacement: (match, g1, g2) => {
|
|
216
|
-
|
|
216
|
+
const phoneNumberRegex = new RegExp(`^${Constants.CONST.REG_EXP.PHONE_PART}$`);
|
|
217
|
+
const mention = g2.slice(1);
|
|
218
|
+
const mentionWithoutSMSDomain = str_1.default.removeSMSDomain(mention);
|
|
219
|
+
if (!str_1.default.isValidMention(match) || (phoneNumberRegex.test(mentionWithoutSMSDomain) && !str_1.default.isValidPhoneNumber(mentionWithoutSMSDomain))) {
|
|
217
220
|
return match;
|
|
218
221
|
}
|
|
219
222
|
return `${g1}<mention-user>${g2}</mention-user>`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expensify-common",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.12",
|
|
4
4
|
"author": "Expensify, Inc.",
|
|
5
5
|
"description": "Expensify libraries and components shared across different repos",
|
|
6
6
|
"homepage": "https://expensify.com",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"eslint": "^8.57.0",
|
|
60
60
|
"eslint-config-expensify": "^2.0.48",
|
|
61
61
|
"eslint-config-prettier": "^8.10.0",
|
|
62
|
-
"eslint-plugin-jest": "^
|
|
62
|
+
"eslint-plugin-jest": "^28.6.0",
|
|
63
63
|
"eslint-plugin-prettier": "^5.1.3",
|
|
64
64
|
"eslint-plugin-you-dont-need-lodash-underscore": "^6.14.0",
|
|
65
65
|
"grunt": "1.6.1",
|