oxidoc-highlight
Lightweight, zero-dependency syntax highlighting that emits HTML with <span class="tok-*"> tokens. Designed for documentation engines where you want fast, predictable output without pulling in tree-sitter or heavyweight grammars.
Supported Languages
Bash, C, CSS, Diff, Go, HTML, Java, JavaScript/JSX, JSON, Markdown, PHP, Python, RDX, Rust, SQL, TOML, TypeScript/TSX, XML, YAML
Usage
let html = highlight;
// → <span class="tok-keyword">let</span> x <span class="tok-operator">=</span> <span class="tok-number">42</span><span class="tok-punctuation">;</span>
// Check language support
assert!;
let langs = supported_languages;
Wasm
Enable the wasm feature to get wasm-bindgen exports:
= { = "0.1", = ["wasm"] }
License
Licensed under either of Apache License, Version 2.0 or MIT License at your option.