fix(highlight): complete markdown syntax highlighting with injections
Fix markdown code block highlighting to properly support both markdown structure (headings, frontmatter) and language injection (rust, bash). The key fix uses `#set! injection.include-children` in the injection query to override tree-sitter-md's internal tokenization, enabling proper highlighting of embedded languages within code fences. Changes: - Use crate's HIGHLIGHT_QUERY_BLOCK for base markdown highlighting - Add custom injection query with include-children directive - Add YAML/TOML frontmatter and HTML block injection rules - Add text.* highlight names (title, literal, uri, reference) - Add string.escape highlight name - Add CSS styles for new highlight classes - Remove unused custom md-highlights.scm
This commit is contained in:
23
docs/static/style.css
vendored
23
docs/static/style.css
vendored
@@ -208,6 +208,29 @@ pre code {
|
||||
color: #ff79c6;
|
||||
}
|
||||
|
||||
/* Markdown-specific text highlighting */
|
||||
.hl-text-title {
|
||||
color: #ff79c6;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hl-text-literal {
|
||||
color: #8be9fd;
|
||||
}
|
||||
|
||||
.hl-text-uri {
|
||||
color: #8be9fd;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.hl-text-reference {
|
||||
color: #bd93f9;
|
||||
}
|
||||
|
||||
.hl-string-escape {
|
||||
color: #ffb86c;
|
||||
}
|
||||
|
||||
/* Section navigation */
|
||||
.section-nav {
|
||||
display: flex;
|
||||
|
||||
Reference in New Issue
Block a user