mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17: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
|
||||
|
||||
((comment) @_gql_comment
|
||||
(#eq? @_gql_comment "/* GraphQL */")
|
||||
(template_string) @graphql)
|
||||
; ((comment) @_gql_comment
|
||||
; (#eq? @_gql_comment "/* GraphQL */")
|
||||
; (template_string) @graphql)
|
||||
|
||||
(((template_string) @_template_string
|
||||
(#match? @_template_string "^`#graphql")) @graphql)
|
||||
((template_string) @graphql
|
||||
(#lua-match? @graphql "^`#graphql")
|
||||
(#offset! @graphql 0 1 0 -1))
|
||||
|
||||
; el.innerHTML = `<html>`
|
||||
(assignment_expression
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue