impasto
    Preparing search index...

    Interface Highlighter

    A thin wrapper around starry-night, with support for undefined flags and scopes.

    interface Highlighter {
        flagToScope: (flag: undefined | string) => undefined | string;
        highlight: (value: string, scope: undefined | string) => Root;
        missingScopes: () => readonly string[];
        register: (grammars: readonly Readonly<Grammar>[]) => Promise<undefined>;
        scopes: () => readonly string[];
    }

    Hierarchy

    Index

    Properties

    flagToScope: (flag: undefined | string) => undefined | string

    Get the grammar scope (such as text.md) associated with a grammar name (such as markdown) or grammar extension (such as .md).

    highlight: (value: string, scope: undefined | string) => Root

    Highlight code as an HTML AST.

    missingScopes: () => readonly string[]
    register: (grammars: readonly Readonly<Grammar>[]) => Promise<undefined>
    scopes: () => readonly string[]