Skip to content

Commit

Permalink
Update highlights.scm and injections.scm for blade.php files (#11138)
Browse files Browse the repository at this point in the history
* Update highlights.scm for blade.php files

* Update injections.scm to add tree-sitter-comment injection

* Fixed the injection issues  regarding blade parameters
  • Loading branch information
EmranMR authored Jul 15, 2024
1 parent 7f77d95 commit 702a96d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
4 changes: 4 additions & 0 deletions runtime/queries/blade/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
(directive_start) @tag
(directive_end) @tag
(comment) @comment
[
(bracket_start)
(bracket_end)
] @punctuation.bracket
13 changes: 9 additions & 4 deletions runtime/queries/blade/injections.scm
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
((text) @injection.content
(#set! injection.combined)
(#set! injection.language php))
(#set! injection.language "php"))

((comment) @injection.content
(#set! injection.language "comment"))

((php_only) @injection.content
(#set! injection.language php-only))
((parameter) @injection.content
(#set! injection.language php-only))
(#set! injection.language "php-only"))

((parameter) @injection.content
(#set! injection.include-children)
(#set! injection.language "php-only"))

0 comments on commit 702a96d

Please sign in to comment.