feat(highlight): add markdown syntax highlighting with injection
Add tree-sitter-md for markdown parsing with injection support for fenced code blocks. Code inside markdown code fences (```rust, ```bash, etc.) is now fully syntax highlighted. Key fix: Use `#set! injection.include-children` directive in the injection query to override tree-sitter-md's internal tokenization of code_fence_content, allowing proper language injection. - Add tree-sitter-md v0.5.2 dependency - Add Markdown variant to Language enum (md, markdown aliases) - Create queries/md-highlights.scm (minimal markdown highlights) - Create queries/md-injections.scm (with include-children directive) - Add test: test_markdown_injection_rust
This commit is contained in:
@@ -38,6 +38,7 @@ toml = "0.8"
|
||||
|
||||
# Diagram rendering
|
||||
mermaid-rs-renderer = { version = "0.1", default-features = false }
|
||||
tree-sitter-md = "0.5.2"
|
||||
|
||||
# Patch dagre_rust to fix unwrap on None bug
|
||||
[patch.crates-io]
|
||||
|
||||
Reference in New Issue
Block a user