mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-12 16:30:02 -04:00
perf(ecma): remove GraphQL comment injection, use lua-match for gql template detection
This commit is contained in:
parent
dad0864fa3
commit
da7f886ab5
1 changed files with 6 additions and 5 deletions
|
|
@ -78,12 +78,13 @@
|
||||||
|
|
||||||
(regex_pattern) @regex
|
(regex_pattern) @regex
|
||||||
|
|
||||||
((comment) @_gql_comment
|
; ((comment) @_gql_comment
|
||||||
(#eq? @_gql_comment "/* GraphQL */")
|
; (#eq? @_gql_comment "/* GraphQL */")
|
||||||
(template_string) @graphql)
|
; (template_string) @graphql)
|
||||||
|
|
||||||
(((template_string) @_template_string
|
((template_string) @graphql
|
||||||
(#match? @_template_string "^`#graphql")) @graphql)
|
(#lua-match? @graphql "^`#graphql")
|
||||||
|
(#offset! @graphql 0 1 0 -1))
|
||||||
|
|
||||||
; el.innerHTML = `<html>`
|
; el.innerHTML = `<html>`
|
||||||
(assignment_expression
|
(assignment_expression
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue