Skip to content

API references

Types, functions, and methods for each Comfit package. For installation and examples, start with the documentation.

JavaScript

  • Node.js: synchronous highlighting and rendering.
  • WebAssembly: browser highlighters, documents, and rendered output.
  • rehype: code-block highlighting in Markdown pipelines.
  • markdown-it: fenced code-block highlighting in markdown-it pipelines.
  • WASM grammars: browser grammar assets and language definitions.

Python

  • comfit: tokens, documents, HTML, and ANSI rendering.

Rust

  • comfit: Rust highlighting with bundled or custom grammars.
  • comfit-core: the shared highlighting engine and rendering APIs.
  • comfit-grammars: bundled parsers and queries.
  • comfit-themes: bundled themes and VS Code theme conversion.