@polotno/pdf-export 0.1.27 → 0.1.28

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.
Files changed (2) hide show
  1. package/lib/text.js +2 -0
  2. package/package.json +1 -1
package/lib/text.js CHANGED
@@ -29,6 +29,8 @@ function normalizeRichText(text) {
29
29
  normalized = normalized.replace(/^\n+/, '').replace(/\n+$/, '');
30
30
  // Decode common HTML non-breaking space entities into their unicode counterpart
31
31
  normalized = normalized.replace(/&(nbsp|#160|#xA0);/gi, '\u00A0');
32
+ // Strip zero-width characters that can create missing-glyph boxes in PDF output
33
+ normalized = normalized.replace(/[\u200B\u200C\u200D\uFEFF\u2060]/g, '');
32
34
  return normalized;
33
35
  }
34
36
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polotno/pdf-export",
3
- "version": "0.1.27",
3
+ "version": "0.1.28",
4
4
  "description": "Convert Polotno JSON into vector PDF",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",