Every released version of Nuri and what changed in it. Entries follow Keep a Changelog, and version numbers follow Semantic Versioning.
The canonical copy lives in CHANGELOG.md at the repository root. Downloadable archives and release notes are on the GitHub releases page.
v1.0.1
Released 2026-06-27.
Changed
- The
<pre>element class is nownuri, notshiki. Single-theme output rendersclass="nuri <theme-name>"and multi-theme output rendersclass="nuri nuri-themes <theme-names>". Stylesheets, transformers, and downstream selectors targeting.shikimust be updated to.nuri. See Output Formats.
v1.0.0
Released 2026-06-24. Initial release.
Added
- TextMate grammar engine. A port of vscode-textmate's tokenizer covering begin/end rules, begin/while rules, captures, end-pattern backreferences, the
\Ganchor, injections, embedded grammars, and$self/$base/#repositoryincludes. See Shiki Compatibility. - Real Oniguruma, no CGO. The Oniguruma regex engine is compiled to WebAssembly and run through wazero, a pure Go WASM runtime. This is the same regex binary Shiki uses, so matching behavior is identical down to the edge cases. An opt-in
onig_cgobuild tag swaps in native Oniguruma for higher throughput. See Architecture. - Shiki fidelity. 227 of 234 tested grammars produce output byte-identical to Shiki. The core bundle's 32 fidelity-tested grammars are at 100%. Golden fixtures are generated from a pinned Shiki version and recorded in
provenance.lock.json. See Fidelity Testing. - Six output formats.
h.CodeToHTML(),h.CodeToANSI(),h.CodeToSVG(),h.CodeToJSON(),h.CodeToPlainText(), andh.CodeToTokens()for raw token access. See Output Formats. - Multi-theme mode. Tokenize once and resolve colors from several themes in a single pass. The default theme emits inline styles; the rest emit CSS variables, so theme switching is pure CSS. See Multi-Theme Mode.
- Transformer pipeline. Notation comments (
[!code ++],[!code highlight],[!code focus]), meta string ranges ({1,3-5}), visible whitespace rendering, and custom hooks over the HTML AST through theTransformerinterface. See Transformers and Custom Transformers. - Line decorations. Per-line and per-range class, style, and attribute injection via
LineRange, independent of the notation transformers. See Line Decorations. - Style-to-class mode. Deterministic hashed class names in place of inline styles, plus a generated stylesheet shared across every code block on a page. See Style-to-Class Mode.
- WCAG 2.1 contrast correction. Token foreground colors are adjusted against the theme background to meet a minimum contrast ratio. Configurable with
nuri.WithMinContrast(); the default ratio is 5.5. See Contrast Correction. - Concurrency safety. WASM instances are held in a bounded LIFO pool sized to
runtime.NumCPU()by default and adjustable withnuri.WithPoolSize(). Highlighting from multiple goroutines is safe. See Performance and Concurrency. - Tokenizer safety. A per-line byte-length pre-filter (
nuri.WithMaxLineLength()), a per-line soft timeout (nuri.WithTimeoutMs()), WASM-level regex interruption, and per-line panic recovery. Each degradation emits the line unstyled and records aDiagnosticrather than failing the call. See Errors and Diagnostics. - Language detection. Resolution by file extension, exact filename, and first-line shebang, plus runtime alias and extension registration. See Custom Languages and Themes.
- Two bundles.
bundle/coreships 38 popular languages and 65 themes in roughly 0.5 MB;bundle/fullships all 257 languages in roughly 1.5 MB. Assets are stored minified and gzipped behind a transparent decompressing filesystem. See Bundled Languages and Themes. - Custom assets. Constructors accept any
fs.FS, so grammars and themes can come from disk, an embedded filesystem, or a test filesystem.h.LoadLanguage()andh.LoadTheme()register additional assets at runtime. See Custom Languages and Themes. - Standalone theme package.
theme.Parse(),theme.Match(), andtheme.Storeexpose VS Code theme parsing and scope matching independently of the highlighter. See Theme Package. - Compilation cache.
nuri.WithCompilationCacheDir()persists the ahead-of-time compiled WASM module across process invocations, removing cold-start cost for short-lived builds. See Configuration.