@jvs-milkdown/crepe 1.2.26 → 1.2.27

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.
@@ -2359,7 +2359,7 @@ const Menu = vue.defineComponent({
2359
2359
  const isTableBlock = (node == null ? void 0 : node.type.name) === "table";
2360
2360
  const isMedia = ((_a = node == null ? void 0 : node.type.name) == null ? void 0 : _a.includes("image")) || isAttachmentBlock || isImageParagraph || (node == null ? void 0 : node.type.name) === "hr" || isTableBlock;
2361
2361
  const showAlign = !isMedia || isImageBlock;
2362
- const isEmpty = node ? node.textContent.length === 0 && node.content.size <= 2 && !isMedia : false;
2362
+ const isEmpty = node ? node.type.name === "paragraph" && node.textContent.length === 0 && node.content.size <= 2 && !isMedia : false;
2363
2363
  const currentAlign = ((_b = node == null ? void 0 : node.attrs) == null ? void 0 : _b.align) || "left";
2364
2364
  const currentIndent = ((_c = node == null ? void 0 : node.attrs) == null ? void 0 : _c.indent) || 0;
2365
2365
  const setAlign = (alignValue) => {
@@ -3315,7 +3315,7 @@ class BlockHandleView {
3315
3315
  });
3316
3316
  }
3317
3317
  const isMedia = node.type.name.includes("image") || node.type.name.includes("attachment") || node.type.name === "hr" || node.type.name.includes("math") || hasMediaChild;
3318
- const isEmpty = node.textContent.length === 0 && node.content.size <= 2 && !isMedia;
3318
+ const isEmpty = node.type.name === "paragraph" && node.textContent.length === 0 && node.content.size <= 2 && !isMedia;
3319
3319
  if (isEmpty) {
3320
3320
  __privateGet(this, _content).classList.add("empty-block");
3321
3321
  } else {
@@ -3466,7 +3466,7 @@ class BlockHandleView {
3466
3466
  });
3467
3467
  }
3468
3468
  const isMedia = node.type.name.includes("image") || node.type.name.includes("attachment") || node.type.name === "hr" || node.type.name.includes("math") || hasMediaChild;
3469
- const isEmpty = node.textContent.length === 0 && node.content.size <= 2 && !isMedia;
3469
+ const isEmpty = node.type.name === "paragraph" && node.textContent.length === 0 && node.content.size <= 2 && !isMedia;
3470
3470
  if (isEmpty) {
3471
3471
  __privateGet(this, _content).classList.add("empty-block");
3472
3472
  } else {