UNPKG

@cartamd/plugin-code

Version:

This plugin adds support for code blocks **syntax highlighting**. It uses the same highlighter from the core package(Shiki).

10 lines (9 loc) 442 B
import type { DualTheme, Theme, Plugin } from 'carta-md'; import type { RehypeShikiOptions } from '@shikijs/rehype'; export type CodeExtensionOptions = Omit<RehypeShikiOptions, 'theme' | 'themes'> & { theme?: Theme | DualTheme; }; /** * Carta code highlighting plugin. Themes available on [GitHub](https://github.com/speed-highlight/core/tree/main/dist/themes). */ export declare const code: (options?: CodeExtensionOptions) => Plugin;