expensify-common 2.0.112 → 2.0.113
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 +1 -1
package/dist/ExpensiMark.js
CHANGED
|
@@ -130,9 +130,12 @@ class ExpensiMark {
|
|
|
130
130
|
// but we should not replace backtick symbols if they include <pre> tags between them.
|
|
131
131
|
// At least one non-whitespace character or a specific whitespace character (" " and "\u00A0")
|
|
132
132
|
// must be present inside the backticks.
|
|
133
|
-
regex: /(\B|_|)`(
|
|
133
|
+
regex: /(\B|_|)`(.*?)`(\B|_|)(?!(?!<pre>)[^<]*(?:<(?!pre>)[^<]*)*<\/pre>|[^<]*<\/video>)/gm,
|
|
134
134
|
replacement: (_extras, _match, g1, g2, g3) => {
|
|
135
135
|
const g2Value = g2.trim() === '' ? g2.replaceAll(' ', ' ') : g2;
|
|
136
|
+
if (!g2Value) {
|
|
137
|
+
return _match;
|
|
138
|
+
}
|
|
136
139
|
return `${g1}<code>${g2Value}</code>${g3}`;
|
|
137
140
|
},
|
|
138
141
|
},
|