perf(ecma): remove GraphQL comment injection, use lua-match for gql template detection

This commit is contained in:
Amaan Qureshi 2023-04-15 19:52:23 -04:00
parent dad0864fa3
commit da7f886ab5

View file

@ -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