mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-15 09:50:04 -04:00
fix(bash): change expensive regex
This commit is contained in:
parent
86f8fbf8d7
commit
91d80b2c73
1 changed files with 5 additions and 4 deletions
|
|
@ -91,7 +91,7 @@
|
||||||
|
|
||||||
(command
|
(command
|
||||||
name: (command_name
|
name: (command_name
|
||||||
(word) @_command)
|
(word)) @_command
|
||||||
.
|
.
|
||||||
argument: (raw_string) @injection.content
|
argument: (raw_string) @injection.content
|
||||||
.
|
.
|
||||||
|
|
@ -102,13 +102,14 @@
|
||||||
|
|
||||||
(command
|
(command
|
||||||
name: (command_name
|
name: (command_name
|
||||||
(word) @_command)
|
(word)) @_command
|
||||||
argument: (_)? @_param
|
argument: (_)? @_param
|
||||||
.
|
.
|
||||||
argument: (raw_string) @injection.content
|
argument: (raw_string) @injection.content
|
||||||
.
|
.
|
||||||
(#eq? @_command "awk")
|
(#eq? @_command "awk")
|
||||||
(#not-match? @_param "^(--file|--field-separator|-[^-]*[fF])")
|
(#not-any-of? @_param "--file" "--field-separator")
|
||||||
|
(#not-lua-match? @_param "^%-[^%-]*[fF]")
|
||||||
(#offset! @injection.content 0 1 0 -1)
|
(#offset! @injection.content 0 1 0 -1)
|
||||||
(#set! injection.include-children)
|
(#set! injection.include-children)
|
||||||
(#set! injection.language "awk"))
|
(#set! injection.language "awk"))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue