Skip to content

Commit e0417ab

Browse files
committed
🐛 Fix import of Tag
1 parent dca0114 commit e0417ab

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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)