diff options
| author | Benny Powers <web@bennypowers.com> | 2023-03-18 22:12:27 +0200 |
|---|---|---|
| committer | Amaan Qureshi <amaanq12@gmail.com> | 2023-03-19 08:20:16 -0400 |
| commit | 38f878a1cd98958f0766fcc410e01ab16d8b8fca (patch) | |
| tree | 7088ab1ce20b9fb876bbfb0f14d0327459d8f4d6 | |
| parent | style: alternation in template literal query (diff) | |
| download | nvim-treesitter-38f878a1cd98958f0766fcc410e01ab16d8b8fca.tar nvim-treesitter-38f878a1cd98958f0766fcc410e01ab16d8b8fca.tar.gz nvim-treesitter-38f878a1cd98958f0766fcc410e01ab16d8b8fca.tar.bz2 nvim-treesitter-38f878a1cd98958f0766fcc410e01ab16d8b8fca.tar.lz nvim-treesitter-38f878a1cd98958f0766fcc410e01ab16d8b8fca.tar.xz nvim-treesitter-38f878a1cd98958f0766fcc410e01ab16d8b8fca.tar.zst nvim-treesitter-38f878a1cd98958f0766fcc410e01ab16d8b8fca.zip | |
fix: svg injection in ecma tagged literals
| -rw-r--r-- | queries/ecma/injections.scm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/queries/ecma/injections.scm b/queries/ecma/injections.scm index ef3b9ba72..bc5af1305 100644 --- a/queries/ecma/injections.scm +++ b/queries/ecma/injections.scm @@ -16,14 +16,14 @@ ; svg`...` or svg(`...`), which uses the html parser, so is not included in the previous query (call_expression - function: ((identifier) @svg) + function: ((identifier) @_name (#eq? @_name "svg")) arguments: [ (arguments - (template_string) @content) - (template_string) @content + (template_string) @html) + (template_string) @html ] - (#offset! @content 0 1 0 -1) - (#eq? @content "svg")) + (#offset! @html 0 1 0 -1)) + (call_expression function: ((identifier) @_name |
