astro-graphql-plugin
Advanced tools
Comparing version 0.2.1 to 0.3.0
{ | ||
"name": "astro-graphql-plugin", | ||
"version": "0.2.1", | ||
"version": "0.3.0", | ||
"type": "module", | ||
@@ -27,3 +27,3 @@ "exports": { | ||
"@types/marked": "5.0.2", | ||
"astro": "^4.6.4", | ||
"astro": "^4.8.4", | ||
"graphql": "16.8.1", | ||
@@ -30,0 +30,0 @@ "typescript": "^5.4.5" |
@@ -186,3 +186,3 @@ import { | ||
export const inputObjects = { | ||
id: "inputObjects", | ||
id: "inputobjects", | ||
title: "Input objects", | ||
@@ -189,0 +189,0 @@ matches(type: GraphQLNamedType): boolean { |
@@ -1,2 +0,2 @@ | ||
import { marked } from "marked"; | ||
import { Token, marked } from "marked"; | ||
@@ -8,3 +8,3 @@ export function escapeSpecialCharacters(str: string): string { | ||
export function parseMarkdown(markdown: string): string { | ||
const walkTokens = (token: marked.Token) => { | ||
const walkTokens = (token: Token) => { | ||
if (token.type === "text" || token.type === "codespan") { | ||
@@ -15,8 +15,8 @@ // make the Markdown compatible with MDX by escaping curly braces | ||
}; | ||
return marked | ||
.parse(markdown, { | ||
return ( | ||
marked.parse(markdown, { | ||
// marked's types are buggy | ||
walkTokens: walkTokens as any, | ||
}) | ||
.trim(); | ||
}) as string | ||
).trim(); | ||
} |
@@ -7,7 +7,6 @@ import { | ||
} from "graphql"; | ||
import Slugger from "github-slugger"; | ||
import { slug } from "github-slugger"; | ||
import * as converters from "./converters"; | ||
const slugger = new Slugger(); | ||
const sluggify = (name: string) => slugger.slug(name); | ||
const sluggify = (name: string) => slug(name); | ||
@@ -14,0 +13,0 @@ function getBaseType(type: GraphQLType): GraphQLNamedType { |
22675
656