# Rosettes 0.2.0 URL: /releases/0.2.0/ Section: releases Tags: release, changelog Date: 2026-02-13 -------------------------------------------------------------------------------- v0.2.0 Released: February 13, 2026 Highlights content_hash() — Deterministic SHA-256 hash for (code, language) pairs, with optional hl_lines and show_linenos for block-level cache keys HighlightItem — Extended highlight_many() supports hl_lines and show_linenos for full parallel batch highlighting HTML Formatter — Pre-compute prefixed span templates; extract line-highlighting helpers for maintainability Theme Registry — Eager initialization with threading.Lock on register_palette() — thread-safety fix Bounds checking — _validate_range() for start/end in highlight() and tokenize() — raises ValueError on invalid ranges Added content_hash(code, language, hl_lines=..., show_linenos=...) — cache key generation HighlightItem dataclass for highlight_many() with line highlighting highlight_many() accepts HighlightItem with hl_lines and show_linenos _validate_range() bounds checking for start/end parameters Changed HTML formatter: pre-compute span templates from class mappings HTML formatter: extract _format_with_hl_lines() and _resolve_span_table() Theme registry: eager init with threading.Lock on register_palette() CI: Replace mypy with ty for typechecking Removed Dead TYPE_CHECKING block in HTML formatter Installation pip install rosettes>=0.2.0 Requires Python 3.14+. Links Documentation GitHub Repository PyPI Package -------------------------------------------------------------------------------- Metadata: - Word Count: 156 - Reading Time: 1 minutes