expensify-common 2.0.44 → 2.0.45
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 +7 -2
- package/package.json +1 -1
package/dist/ExpensiMark.js
CHANGED
|
@@ -368,8 +368,13 @@ class ExpensiMark {
|
|
|
368
368
|
// \B will match everything that \b doesn't, so it works
|
|
369
369
|
// for * and ~: https://www.rexegg.com/regex-boundaries.html#notb
|
|
370
370
|
name: 'bold',
|
|
371
|
-
regex: /(?<!<[^>]*)\B\*(?![^<]*(?:<\/pre>|<\/code>|<\/a>))((?![\s*])[\s\S]*?[^\s*](?<!\s))\*\B(?![^<]*>)(?![^<]*(<\/pre>|<\/code>|<\/a>))/g,
|
|
372
|
-
replacement: (_extras, match, g1) =>
|
|
371
|
+
regex: /(?<!<[^>]*)(\b_|\B)\*(?![^<]*(?:<\/pre>|<\/code>|<\/a>))((?![\s*])[\s\S]*?[^\s*](?<!\s))\*\B(?![^<]*>)(?![^<]*(<\/pre>|<\/code>|<\/a>))/g,
|
|
372
|
+
replacement: (_extras, match, g1, g2) => {
|
|
373
|
+
if (g1.includes('_')) {
|
|
374
|
+
return `${g1}<strong>${g2}</strong>`;
|
|
375
|
+
}
|
|
376
|
+
return g2.includes('</pre>') || this.containsNonPairTag(g2) ? match : `<strong>${g2}</strong>`;
|
|
377
|
+
},
|
|
373
378
|
},
|
|
374
379
|
{
|
|
375
380
|
name: 'strikethrough',
|