@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
|
-
|
|
19485
|
-
if (!html2)
|
|
19484
|
+
if (!node.innerHTML.trim())
|
|
19486
19485
|
node.remove();
|
|
19487
19486
|
}
|
|
19488
19487
|
_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> </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>';
|