@tiptap/core 3.20.1 → 3.20.2

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.cjs CHANGED
@@ -6561,17 +6561,21 @@ function renderNestedMarkdownContent(node, h2, prefixOrGenerator, ctx) {
6561
6561
  const prefix = typeof prefixOrGenerator === "function" ? prefixOrGenerator(ctx) : prefixOrGenerator;
6562
6562
  const [content, ...children] = node.content;
6563
6563
  const mainContent = h2.renderChildren([content]);
6564
- const output = [`${prefix}${mainContent}`];
6564
+ let output = `${prefix}${mainContent}`;
6565
6565
  if (children && children.length > 0) {
6566
- children.forEach((child) => {
6567
- const childContent = h2.renderChildren([child]);
6568
- if (childContent) {
6569
- const indentedChild = childContent.split("\n").map((line) => line ? h2.indent(line) : "").join("\n");
6570
- output.push(indentedChild);
6566
+ children.forEach((child, index) => {
6567
+ var _a, _b;
6568
+ const childContent = (_b = (_a = h2.renderChild) == null ? void 0 : _a.call(h2, child, index + 1)) != null ? _b : h2.renderChildren([child]);
6569
+ if (childContent !== void 0 && childContent !== null) {
6570
+ const indentedChild = childContent.split("\n").map((line) => line ? h2.indent(line) : h2.indent("")).join("\n");
6571
+ output += child.type === "paragraph" ? `
6572
+
6573
+ ${indentedChild}` : `
6574
+ ${indentedChild}`;
6571
6575
  }
6572
6576
  });
6573
6577
  }
6574
- return output.join("\n");
6578
+ return output;
6575
6579
  }
6576
6580
 
6577
6581
  // src/MarkView.ts