feat: add tree-sitter syntax highlighting module
- Cargo.toml: Add tree-sitter-highlight + grammar crates (rust, bash, json). TOML dropped due to API incompatibility. - src/highlight.rs: Language enum, highlight_code() function, 4 unit tests covering parsing and HTML generation. - Uses static HTML_ATTRS array for zero-allocation rendering.
This commit is contained in:
@@ -11,3 +11,9 @@ maud = "0.26"
|
||||
pulldown-cmark = "0.12"
|
||||
thiserror = "2"
|
||||
walkdir = "2"
|
||||
|
||||
# Syntax highlighting
|
||||
tree-sitter-bash = "0.23"
|
||||
tree-sitter-highlight = "0.24"
|
||||
tree-sitter-json = "0.24"
|
||||
tree-sitter-rust = "0.23"
|
||||
|
||||
Reference in New Issue
Block a user