@scrider/formatter 1.10.9 → 1.10.10

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/index.js CHANGED
@@ -405,6 +405,9 @@ var LIST_WRAPPER_TAGS = {
405
405
  checked: "ul",
406
406
  unchecked: "ul"
407
407
  };
408
+ function listWrapperFamily(listType) {
409
+ return LIST_WRAPPER_TAGS[listType] || "ul";
410
+ }
408
411
  var EMBED_RENDERERS = {
409
412
  image: (value, attrs) => {
410
413
  const src = typeof value === "string" ? value : "";
@@ -3830,7 +3833,7 @@ function handleListOpen(stack, listType, indent, pretty, resolvedDocumentPresent
3830
3833
  }
3831
3834
  }
3832
3835
  const top = stack[stack.length - 1];
3833
- if (top && top.indent === indent && top.type !== listType) {
3836
+ if (top && top.indent === indent && listWrapperFamily(top.type) !== listWrapperFamily(listType)) {
3834
3837
  const closed = stack.pop();
3835
3838
  if (closed) {
3836
3839
  const closeTag = LIST_WRAPPER_TAGS[closed.type] || "ul";