diff --git a/packages/docs/src/components/app/Markdown.vue b/packages/docs/src/components/app/Markdown.vue index 88b551085db..03f9fbe732c 100644 --- a/packages/docs/src/components/app/Markdown.vue +++ b/packages/docs/src/components/app/Markdown.vue @@ -10,6 +10,7 @@ import { compile } from '@vue/compiler-dom' import * as vue from 'vue' + import { VCode } from 'vuetify/components/VCode' import { VWindowItem } from 'vuetify/components/VWindow' import { VTab } from 'vuetify/components/VTabs' import AppMarkup from '@/components/app/Markup.vue' @@ -125,6 +126,7 @@ const template = computed(() => ({ // These components are all used in markdown-it-rules components: { + VCode, VWindowItem, VTab, AppMarkup, diff --git a/packages/docs/src/utils/markdown-it-rules.ts b/packages/docs/src/utils/markdown-it-rules.ts index 5d33b9cd4b3..9472cbfc979 100644 --- a/packages/docs/src/utils/markdown-it-rules.ts +++ b/packages/docs/src/utils/markdown-it-rules.ts @@ -19,10 +19,10 @@ function addCodeRules (md: MarkdownIt) { (token.attrs || []).reduce((acc, [key, value]) => { acc[key] = acc[key] ? acc[key] + ' ' + value : value return acc - }, { class: 'v-code' } as Record) + }, {} as Record) ).map(([key, value]) => `${key}="${value}"`).join(' ') - return `${md.utils.escapeHtml(token.content)}` + return `${md.utils.escapeHtml(token.content)}` } createContainer(md, 'error') diff --git a/packages/vuetify/src/components/VCode/index.ts b/packages/vuetify/src/components/VCode/index.ts index 3b58b9c8a55..0ae2c9f0b4e 100644 --- a/packages/vuetify/src/components/VCode/index.ts +++ b/packages/vuetify/src/components/VCode/index.ts @@ -4,6 +4,6 @@ import './VCode.sass' // Utilities import { createSimpleFunctional } from '@/util' -export const VCode = createSimpleFunctional('v-code') +export const VCode = createSimpleFunctional('v-code', 'code') export type VCode = InstanceType diff --git a/packages/vuetify/src/components/VKbd/index.ts b/packages/vuetify/src/components/VKbd/index.ts index 1f09551cb80..b18344ff48c 100644 --- a/packages/vuetify/src/components/VKbd/index.ts +++ b/packages/vuetify/src/components/VKbd/index.ts @@ -4,6 +4,6 @@ import './VKbd.sass' // Utilities import { createSimpleFunctional } from '@/util' -export const VKbd = createSimpleFunctional('v-kbd') +export const VKbd = createSimpleFunctional('v-kbd', 'kbd') export type VKbd = InstanceType