mdc.json
v0.0.2
Published
TextMate Grammar for adding MDC (Markdown Components) language support to VSCode, Monaco, and Shiki!
Downloads
7
Maintainers
Readme
mdc.json
Install
pnpm add mdc.json
yarn add mdc.json
npm i mdc.json
Implement
Shiki
import { getHighlighter } from 'shikey'
import mdcTMLanguage from 'mdc.json'
const highlighter = await getHighlighter({
theme: 'dracula',
langs: [
'md',
{
id: 'md',
scopeName: 'text.markdown.mdc',
path: 'mdc.tmLanguage.json',
aliases: ['markdown', 'mdc'],
grammar: mdcTMLanguage,
},
]
})
await highlighter
.codeToHtml(':alert{type="primary"}', { lang: 'md', theme: 'dracula' })
.then(console.log)