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.
@@ -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|_|)&#x60;((?:&#x60;)*(?!&#x60;).*?[\S| |\u00A0]+?.*?(?<!&#x60;)(?:&#x60;)*)&#x60;(\B|_|)(?!&#x60;|(?!<pre>)[^<]*(?:<(?!pre>)[^<]*)*<\/pre>|[^<]*<\/video>)/gm,
133
+ regex: /(\B|_|)&#x60;(.*?)&#x60;(\B|_|)(?!(?!<pre>)[^<]*(?:<(?!pre>)[^<]*)*<\/pre>|[^<]*<\/video>)/gm,
134
134
  replacement: (_extras, _match, g1, g2, g3) => {
135
135
  const g2Value = g2.trim() === '' ? g2.replaceAll(' ', '&nbsp;') : g2;
136
+ if (!g2Value) {
137
+ return _match;
138
+ }
136
139
  return `${g1}<code>${g2Value}</code>${g3}`;
137
140
  },
138
141
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expensify-common",
3
- "version": "2.0.112",
3
+ "version": "2.0.113",
4
4
  "author": "Expensify, Inc.",
5
5
  "description": "Expensify libraries and components shared across different repos",
6
6
  "homepage": "https://expensify.com",