From 8113c2163c371c46b1041c9c8461d7d1ef04d4cd Mon Sep 17 00:00:00 2001 From: Benjamin Canac Date: Fri, 28 Jun 2024 21:35:57 +0200 Subject: [PATCH] docs(HighlightInlineType): use `ts-type` language --- docs/app/components/content/HighlightInlineType.vue | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/docs/app/components/content/HighlightInlineType.vue b/docs/app/components/content/HighlightInlineType.vue index f87a5593..817800a0 100644 --- a/docs/app/components/content/HighlightInlineType.vue +++ b/docs/app/components/content/HighlightInlineType.vue @@ -5,18 +5,7 @@ const props = defineProps<{ type: string }>() -const { data: ast } = await useAsyncData(`hightlight-inline-code-` + props.type, async () => { - const ast = await parseMarkdown(`\`type _ = ${props.type}\`{lang="ts"}`) - - const p = ast.body.children[0] - const code = p.children[0] - - // Remove the `type _ = ` part - code.children = code.children.slice(3) - ast.body.children = [code] - - return ast -}) +const { data: ast } = await useAsyncData(`hightlight-inline-code-` + props.type, () => parseMarkdown(`\`${props.type}\`{lang="ts-type"}`))