@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 +11 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +11 -7
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/types.ts +6 -0
- package/src/utilities/markdown/renderNestedMarkdownContent.ts +9 -7
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
|
-
|
|
6564
|
+
let output = `${prefix}${mainContent}`;
|
|
6565
6565
|
if (children && children.length > 0) {
|
|
6566
|
-
children.forEach((child) => {
|
|
6567
|
-
|
|
6568
|
-
|
|
6569
|
-
|
|
6570
|
-
|
|
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
|
|
6578
|
+
return output;
|
|
6575
6579
|
}
|
|
6576
6580
|
|
|
6577
6581
|
// src/MarkView.ts
|