expensify-common 2.0.34 → 2.0.35

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.
@@ -67,20 +67,20 @@ class ExpensiMark {
67
67
  {
68
68
  name: 'codeFence',
69
69
  // ` is a backtick symbol we are matching on three of them before then after a new line character
70
- regex: /(```(?:\r\n|\n))((?:\s*?(?!(?:\r\n|\n)?```(?!`))[\S])+\s*?(?:\r\n|\n))(```)/g,
70
+ regex: /(```(\r\n|\n))((?:\s*?(?!(?:\r\n|\n)?```(?!`))[\S])+\s*?(?:\r\n|\n))(```)/g,
71
71
  // We're using a function here to perform an additional replace on the content
72
72
  // inside the backticks because Android is not able to use <pre> tags and does
73
73
  // not respect whitespace characters at all like HTML does. We do not want to mess
74
74
  // with the new lines here since they need to be converted into <br>. And we don't
75
75
  // want to do this anywhere else since that would break HTML.
76
76
  // &nbsp; will create styling issues so use &#32;
77
- replacement: (_extras, _match, _g1, textWithinFences) => {
77
+ replacement: (_extras, _match, _g1, _g2, textWithinFences) => {
78
78
  const group = textWithinFences.replace(/(?:(?![\n\r])\s)/g, '&#32;');
79
79
  return `<pre>${group}</pre>`;
80
80
  },
81
- rawInputReplacement: (_extras, _match, _g1, textWithinFences) => {
81
+ rawInputReplacement: (_extras, _match, _g1, newLineCharacter, textWithinFences) => {
82
82
  const group = textWithinFences.replace(/(?:(?![\n\r])\s)/g, '&#32;').replace(/<emoji>|<\/emoji>/g, '');
83
- return `<pre>${group}</pre>`;
83
+ return `<pre>${newLineCharacter}${group}</pre>`;
84
84
  },
85
85
  },
86
86
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expensify-common",
3
- "version": "2.0.34",
3
+ "version": "2.0.35",
4
4
  "author": "Expensify, Inc.",
5
5
  "description": "Expensify libraries and components shared across different repos",
6
6
  "homepage": "https://expensify.com",