File tree Expand file tree Collapse file tree 3 files changed +12
-6
lines changed
Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change 1+ # Built files
12dist
3+ .svelte-kit
4+ build
5+
6+ # Dependencies
27node_modules
38.npmrc
49
5- coverage
10+ # Test files
11+ coverage
Original file line number Diff line number Diff line change 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 ,
Original file line number Diff line number Diff line change 1- import { Tag } from "@markdoc/markdoc" ;
1+ import Markdoc from "@markdoc/markdoc" ;
22import type { RenderableTreeNode , Schema } from "@markdoc/markdoc" ;
33
44import 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} ;
You canβt perform that action at this time.
0 commit comments