Skip to content

Commit 2dd86fe

Browse files
committed
🔀 Merge remote-tracking branch 'origin/main' into docs
2 parents 5507bab + 3e3298d commit 2dd86fe

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

‎packages/markdoc-svelte/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "markdoc-svelte",
3-
"version": "4.0.0",
3+
"version": "4.1.0",
44
"type": "module",
55
"description": "A preprocessor to render Markdoc in Svelte",
66
"sideEffects": false,

‎packages/markdoc-svelte/src/headings.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Tag } from "@markdoc/markdoc";
1+
import Markdoc from "@markdoc/markdoc";
22
import type { RenderableTreeNode, Schema } from "@markdoc/markdoc";
33

44
import type { MarkdocSvelteConfig, SluggerType } from "./types.ts";
@@ -22,7 +22,7 @@ const getTextContent = (children: RenderableTreeNode[]): string => {
2222
return children.reduce((text: string, child): string => {
2323
if (typeof child === "string" || typeof child === "number") {
2424
return text + child;
25-
} else if (typeof child === "object" && Tag.isTag(child)) {
25+
} else if (typeof child === "object" && Markdoc.Tag.isTag(child)) {
2626
return text + getTextContent(child.children);
2727
}
2828
return text;
@@ -72,7 +72,7 @@ export function collectHeadings(
7272
}
7373

7474
if ("name" in node) {
75-
const tag = node as Tag;
75+
const tag = node as Markdoc.Tag;
7676

7777
// Handle basic headings
7878
if (tag.name.match(/^h\d$/)) {
@@ -126,6 +126,6 @@ export const heading: Schema = {
126126
level: level as number,
127127
};
128128

129-
return new Tag(render, tagProps, children);
129+
return new Markdoc.Tag(render, tagProps, children);
130130
},
131131
};

0 commit comments

Comments
 (0)