feat: integrate syntax highlighting into render pipeline

- src/render.rs: Rewrite with event-based pulldown-cmark parsing.
  Intercepts CodeBlock events and applies tree-sitter highlighting.
  4 new tests covering highlighted and unhighlighted code blocks.

- src/highlight.rs: Fix HtmlRenderer callback to return attributes
  only (not full span tags). Static HTML_ATTRS array for zero-alloc.

- static/style.css: Add 20 hl-* CSS classes with CSS variables.
  Light and dark mode via prefers-color-scheme.

Supported languages: rust, bash, json. Phase 2 complete.
This commit is contained in:
Timothy DeHerrera
2026-01-24 20:47:31 -07:00
parent ba5e97dfb7
commit c145bf86b9
4 changed files with 381 additions and 38 deletions

View File

@@ -42,6 +42,7 @@
toolchain
pkgs.treefmt
pkgs.shfmt
pkgs.rust-analyzer
pkgs.taplo
pkgs.pkg-config
pkgs.nixfmt