@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.
- package/lib/text.js +2 -0
- 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
|
/**
|