sr-npm 1.7.1253 → 1.7.1255
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.
|
@@ -336,8 +336,9 @@ function addEmptyParagraphsBetweenConsecutive(html, richContent) {
|
|
|
336
336
|
|
|
337
337
|
const hasConsecutiveParagraphs = /<\/p>\s*<p/i.test(html);
|
|
338
338
|
const hasParagraphBeforeList = /<\/p>\s*<ul/i.test(html);
|
|
339
|
+
const hasParagraphAfterList = /<\/ul>\s*<p/i.test(html);
|
|
339
340
|
|
|
340
|
-
if (!hasConsecutiveParagraphs && !hasParagraphBeforeList) return richContent;
|
|
341
|
+
if (!hasConsecutiveParagraphs && !hasParagraphBeforeList && !hasParagraphAfterList) return richContent;
|
|
341
342
|
|
|
342
343
|
const nodes = richContent.nodes;
|
|
343
344
|
const newNodes = [];
|
|
@@ -359,6 +360,11 @@ function addEmptyParagraphsBetweenConsecutive(html, richContent) {
|
|
|
359
360
|
newNodes.push(createEmptyParagraph(`empty_before_list_${nodeIdCounter++}`));
|
|
360
361
|
}
|
|
361
362
|
}
|
|
363
|
+
|
|
364
|
+
// Add empty paragraph after list
|
|
365
|
+
if (hasParagraphAfterList && currentNode.type === 'BULLETED_LIST' && nextNode && nextNode.type === 'PARAGRAPH') {
|
|
366
|
+
newNodes.push(createEmptyParagraph(`empty_after_list_${nodeIdCounter++}`));
|
|
367
|
+
}
|
|
362
368
|
}
|
|
363
369
|
|
|
364
370
|
return {
|