Commit
+76 -0 +/-1 browse
1 | diff --git a/test/corpus/text.txt b/test/corpus/text.txt |
2 | index 50ef259..73cc93b 100644 |
3 | --- a/test/corpus/text.txt |
4 | +++ b/test/corpus/text.txt |
5 | @@ -149,3 +149,79 @@ Just a file declaration and no newline |
6 | (source |
7 | (old_file |
8 | (filename))) |
9 | + |
10 | + ================================================================================ |
11 | + location tokens in diff |
12 | + ================================================================================ |
13 | + diff --git a/runtime/queries/elixir/highlights.scm b/runtime/queries/elixir/highlights.scm |
14 | + index 76fd2af..308ff34 100644 |
15 | + --- a/runtime/queries/elixir/highlights.scm |
16 | + +++ b/runtime/queries/elixir/highlights.scm |
17 | + @@ -125,7 +125,8 @@ |
18 | + (sigil |
19 | + (sigil_name) @__name__ |
20 | + quoted_start: _ @string.special |
21 | + - quoted_end: _ @string.special) @string.special |
22 | + + quoted_end: _ @string.special |
23 | + + (#not-eq? @__name__ "H")) @string.special |
24 | + |
25 | + ; Calls |
26 | + |
27 | + diff --git a/runtime/queries/elixir/injections.scm b/runtime/queries/elixir/injections.scm |
28 | + index 321c90a..b4a5cba 100644 |
29 | + --- a/runtime/queries/elixir/injections.scm |
30 | + +++ b/runtime/queries/elixir/injections.scm |
31 | + @@ -1,2 +1,8 @@ |
32 | + ((comment) @injection.content |
33 | + (#set! injection.language "comment")) |
34 | + + |
35 | + +((sigil |
36 | + + (sigil_name) @_sigil_name |
37 | + + (quoted_content) @injection.content) |
38 | + + (#eq? @_sigil_name "H") |
39 | + + (#set! injection.language "heex")) |
40 | + |
41 | + -------------------------------------------------------------------------------- |
42 | + |
43 | + (source |
44 | + (command |
45 | + (filename)) |
46 | + (index |
47 | + (commit) |
48 | + (commit) |
49 | + (mode)) |
50 | + (old_file |
51 | + (filename)) |
52 | + (new_file |
53 | + (filename)) |
54 | + (location |
55 | + (linerange) |
56 | + (linerange)) |
57 | + (context) |
58 | + (context) |
59 | + (context) |
60 | + (deletion) |
61 | + (addition) |
62 | + (addition) |
63 | + (context) |
64 | + (command |
65 | + (filename)) |
66 | + (index |
67 | + (commit) |
68 | + (commit) |
69 | + (mode)) |
70 | + (old_file |
71 | + (filename)) |
72 | + (new_file |
73 | + (filename)) |
74 | + (location |
75 | + (linerange) |
76 | + (linerange)) |
77 | + (context) |
78 | + (context) |
79 | + (addition) |
80 | + (addition) |
81 | + (addition) |
82 | + (addition) |
83 | + (addition) |
84 | + (addition)) |