@zipify/wysiwyg 1.0.0-dev.97 → 1.0.0-dev.98

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/wysiwyg.mjs CHANGED
@@ -19481,8 +19481,7 @@ const _ContentNormalizer = class {
19481
19481
  }
19482
19482
  }
19483
19483
  _removeEmptyNodes(node) {
19484
- const html2 = node.innerHTML.replace(/ /g, "").trim();
19485
- if (!html2)
19484
+ if (!node.innerHTML.trim())
19486
19485
  node.remove();
19487
19486
  }
19488
19487
  _normalizeListItems(itemEl) {
@@ -74,9 +74,7 @@ export class ContentNormalizer {
74
74
  }
75
75
 
76
76
  _removeEmptyNodes(node) {
77
- const html = node.innerHTML.replace(/ /g, '').trim();
78
-
79
- if (!html) node.remove();
77
+ if (!node.innerHTML.trim()) node.remove();
80
78
  }
81
79
 
82
80
  _normalizeListItems(itemEl) {
@@ -92,13 +92,6 @@ describe('normalize text content', () => {
92
92
  expect(ContentNormalizer.normalize(input)).toBe(output);
93
93
  });
94
94
 
95
- test('should ignore non-breaking space only nodes', () => {
96
- const input = '<p>lorem ipsum 1</p><p>&nbsp;</p><p>lorem ipsum 2</p>';
97
- const output = '<p>lorem ipsum 1</p><p>lorem ipsum 2</p>';
98
-
99
- expect(ContentNormalizer.normalize(input)).toBe(output);
100
- });
101
-
102
95
  test('should ignore newline chapters only nodes', () => {
103
96
  const input = '<p>lorem ipsum 1</p><p>\n</p><p>lorem ipsum 2</p>';
104
97
  const output = '<p>lorem ipsum 1</p><p>lorem ipsum 2</p>';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zipify/wysiwyg",
3
- "version": "1.0.0-dev.97",
3
+ "version": "1.0.0-dev.98",
4
4
  "description": "Zipify modification of TipTap text editor",
5
5
  "main": "dist/wysiwyg.mjs",
6
6
  "repository": {