Trevixal API
    Preparing search index...

    The injectable highlighter contract. Wrap any engine that can emit offset-based tokens synchronously, e.g. Shiki after createHighlighter resolved, or a hand-rolled tokenizer. The editor core never depends on a highlighting library.

    interface Highlighter {
        highlight(
            code: string,
            language: string | null,
        ): readonly HighlightToken[];
    }
    Index
    • Parameters

      • code: string
      • language: string | null

      Returns readonly HighlightToken[]