expensify-common 2.0.207 → 2.0.209
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/CONST.d.ts +1 -0
- package/dist/CONST.js +1 -0
- package/dist/ExpensiMark.js +11 -6
- package/dist/esm/CONST.d.ts +1 -0
- package/dist/esm/CONST.js +1 -0
- package/dist/esm/ExpensiMark.js +11 -6
- package/package.json +1 -1
package/dist/CONST.d.ts
CHANGED
|
@@ -799,6 +799,7 @@ declare const CONST: {
|
|
|
799
799
|
readonly REPLACE_CARD: "replace_card";
|
|
800
800
|
readonly SHIP_CARD: "ship_card";
|
|
801
801
|
readonly REPORT_CARD_FRAUD: "report_card_fraud";
|
|
802
|
+
readonly APPROVE_DIGITAL_WALLET: "approve_digital_wallet";
|
|
802
803
|
readonly ISSUE_CARD: "issue_card";
|
|
803
804
|
readonly UPDATE_CARD: "update_card";
|
|
804
805
|
readonly UPDATE_PERSONAL_DETAILS: "update_personal_details";
|
package/dist/CONST.js
CHANGED
|
@@ -842,6 +842,7 @@ const CONST = {
|
|
|
842
842
|
REPLACE_CARD: 'replace_card',
|
|
843
843
|
SHIP_CARD: 'ship_card',
|
|
844
844
|
REPORT_CARD_FRAUD: 'report_card_fraud',
|
|
845
|
+
APPROVE_DIGITAL_WALLET: 'approve_digital_wallet',
|
|
845
846
|
ISSUE_CARD: 'issue_card',
|
|
846
847
|
UPDATE_CARD: 'update_card',
|
|
847
848
|
UPDATE_PERSONAL_DETAILS: 'update_personal_details',
|
package/dist/ExpensiMark.js
CHANGED
|
@@ -1214,13 +1214,18 @@ class ExpensiMark {
|
|
|
1214
1214
|
},
|
|
1215
1215
|
{
|
|
1216
1216
|
name: 'anchor',
|
|
1217
|
-
regex:
|
|
1218
|
-
replacement: (_extras, _match,
|
|
1219
|
-
const
|
|
1220
|
-
|
|
1221
|
-
|
|
1217
|
+
regex: /(\]\()?<(a)[^><]*href\s*=\s*(['"])(.*?)\3(?:".*?"|'.*?'|[^'"><])*>([\s\S]*?)<\/\2>(?![^<]*(<\/pre>|<\/code>))/gi,
|
|
1218
|
+
replacement: (_extras, _match, g1, _g2, _g3, g4, g5) => {
|
|
1219
|
+
const incompleteLinkStart = g1 !== null && g1 !== void 0 ? g1 : '';
|
|
1220
|
+
const email = g4.startsWith('mailto:') ? g4.slice(7) : '';
|
|
1221
|
+
if (email === g5) {
|
|
1222
|
+
return `${incompleteLinkStart}${email}`;
|
|
1222
1223
|
}
|
|
1223
|
-
|
|
1224
|
+
// An autolinked URL right after an incomplete link's `](` has to stay bare, or the link nests a copy of it
|
|
1225
|
+
if (incompleteLinkStart && (g4 === g5 || g4 === `https://${g5}`)) {
|
|
1226
|
+
return `${incompleteLinkStart}${g5}`;
|
|
1227
|
+
}
|
|
1228
|
+
return `${incompleteLinkStart}[${g5}](${email || g4})`;
|
|
1224
1229
|
},
|
|
1225
1230
|
},
|
|
1226
1231
|
{
|
package/dist/esm/CONST.d.ts
CHANGED
|
@@ -799,6 +799,7 @@ declare const CONST: {
|
|
|
799
799
|
readonly REPLACE_CARD: "replace_card";
|
|
800
800
|
readonly SHIP_CARD: "ship_card";
|
|
801
801
|
readonly REPORT_CARD_FRAUD: "report_card_fraud";
|
|
802
|
+
readonly APPROVE_DIGITAL_WALLET: "approve_digital_wallet";
|
|
802
803
|
readonly ISSUE_CARD: "issue_card";
|
|
803
804
|
readonly UPDATE_CARD: "update_card";
|
|
804
805
|
readonly UPDATE_PERSONAL_DETAILS: "update_personal_details";
|
package/dist/esm/CONST.js
CHANGED
|
@@ -837,6 +837,7 @@ const CONST = {
|
|
|
837
837
|
REPLACE_CARD: 'replace_card',
|
|
838
838
|
SHIP_CARD: 'ship_card',
|
|
839
839
|
REPORT_CARD_FRAUD: 'report_card_fraud',
|
|
840
|
+
APPROVE_DIGITAL_WALLET: 'approve_digital_wallet',
|
|
840
841
|
ISSUE_CARD: 'issue_card',
|
|
841
842
|
UPDATE_CARD: 'update_card',
|
|
842
843
|
UPDATE_PERSONAL_DETAILS: 'update_personal_details',
|
package/dist/esm/ExpensiMark.js
CHANGED
|
@@ -1176,13 +1176,18 @@ class ExpensiMark {
|
|
|
1176
1176
|
},
|
|
1177
1177
|
{
|
|
1178
1178
|
name: 'anchor',
|
|
1179
|
-
regex:
|
|
1180
|
-
replacement: (_extras, _match,
|
|
1181
|
-
const
|
|
1182
|
-
|
|
1183
|
-
|
|
1179
|
+
regex: /(\]\()?<(a)[^><]*href\s*=\s*(['"])(.*?)\3(?:".*?"|'.*?'|[^'"><])*>([\s\S]*?)<\/\2>(?![^<]*(<\/pre>|<\/code>))/gi,
|
|
1180
|
+
replacement: (_extras, _match, g1, _g2, _g3, g4, g5) => {
|
|
1181
|
+
const incompleteLinkStart = g1 !== null && g1 !== void 0 ? g1 : '';
|
|
1182
|
+
const email = g4.startsWith('mailto:') ? g4.slice(7) : '';
|
|
1183
|
+
if (email === g5) {
|
|
1184
|
+
return `${incompleteLinkStart}${email}`;
|
|
1184
1185
|
}
|
|
1185
|
-
|
|
1186
|
+
// An autolinked URL right after an incomplete link's `](` has to stay bare, or the link nests a copy of it
|
|
1187
|
+
if (incompleteLinkStart && (g4 === g5 || g4 === `https://${g5}`)) {
|
|
1188
|
+
return `${incompleteLinkStart}${g5}`;
|
|
1189
|
+
}
|
|
1190
|
+
return `${incompleteLinkStart}[${g5}](${email || g4})`;
|
|
1186
1191
|
},
|
|
1187
1192
|
},
|
|
1188
1193
|
{
|