@shbernal/ts-xlsx 3.2.2-next.26.gf63f249 → 3.2.2-next.28.gf97d4d7

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/xml/xml.d.ts CHANGED
@@ -26,7 +26,9 @@ export declare function escapeFormatCode(code: string): string;
26
26
  * value that legitimately reads `_x0041_` would come back as `A`, so the underscore is
27
27
  * escaped first, and only where it begins a sequence that would otherwise decode, leaving
28
28
  * every other underscore alone. Doing that after the character escape would re-escape the
29
- * `_x005F_` it had just introduced.
29
+ * `_x005F_` it had just introduced. The match is a lookahead because the underscore that closes
30
+ * one lookalike can open the next, as in `_x005F_x0041_`; consuming it would leave the second
31
+ * unescaped, to read back as `A`.
30
32
  *
31
33
  * `escapeText` runs last and sees no unrepresentable character left, so its guard is a
32
34
  * standing proof that the escape was complete rather than a second check of the same thing.
package/dist/xml/xml.js CHANGED
@@ -36,7 +36,7 @@ export function escapeFormatCode(code) {
36
36
  }
37
37
  export function escapeSpreadsheetText(value) {
38
38
  return escapeText(value
39
- .replace(/_(x[0-9A-Fa-f]{4}_)/g, '_x005F_$1')
39
+ .replace(/_(?=x[0-9A-Fa-f]{4}_)/g, '_x005F_')
40
40
  .replace(XML_UNREPRESENTABLE_GLOBAL, (ch) => `_x${codePointHex(ch.codePointAt(0))}_`));
41
41
  }
42
42
  function needsSpacePreserve(value) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shbernal/ts-xlsx",
3
- "version": "3.2.2-next.26.gf63f249",
3
+ "version": "3.2.2-next.28.gf97d4d7",
4
4
  "description": "A TypeScript-first library for reading and writing xlsx (OOXML) spreadsheets.",
5
5
  "keywords": [
6
6
  "csv",
@@ -76,7 +76,7 @@
76
76
  "access": "public"
77
77
  },
78
78
  "scripts": {
79
- "prepare": "node scripts/install-hooks.ts",
79
+ "prepare": "lefthook install",
80
80
  "build": "node scripts/build.ts",
81
81
  "size": "node scripts/size-budget.ts",
82
82
  "smoke:dist": "node scripts/smoke-dist.ts",