Skip to content

Commit

Permalink
Support comment.foo highlighting queries
Browse files Browse the repository at this point in the history
This should improve highlighting in cases like Elm that use
`@comment.elm`.
  • Loading branch information
Wilfred committed May 11, 2024
1 parent 835c5eb commit e51834f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sample_files/compare.expected
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ sample_files/text_1.txt sample_files/text_2.txt
87914b8ef4a6b042054633ddb182ce02 -

sample_files/todomvc_1.gleam sample_files/todomvc_2.gleam
070fbdea2a503392f0f0c37f1b6c04bb -
0a6f8335944adbd779c93aa52b7a30c5 -

sample_files/toml_1.toml sample_files/toml_2.toml
df36cf07bb1b56fbdbcea7f651b4344d -
Expand Down
2 changes: 1 addition & 1 deletion src/parse/tree_sitter_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1302,7 +1302,7 @@ fn tree_highlights(
type_capture_ids.push(idx as u32);
}

if name == "comment" {
if name == "comment" || name.starts_with("comment.") {
comment_capture_ids.push(idx as u32);
}
}
Expand Down

0 comments on commit e51834f

Please sign in to comment.