mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
highlights(latex): fix regexes with backslashes
https://github.com/neovim/neovim/pull/14382 requires to escape `\` is regexes if they are verbatim `\` They change in Neovim was incompatible so people that are still behind that revision will have this regex not matching (but it should at least not error)
This commit is contained in:
parent
f7422402ca
commit
efbb1c66d2
1 changed files with 4 additions and 4 deletions
|
|
@ -10,7 +10,7 @@
|
|||
name: (word) @_env)) @text.math
|
||||
(#match? @_env "^(displaymath|equation|multline|eqnarray|align|array|split)[*]?$"))
|
||||
|
||||
;; This at the begining of the file would be the alternative to highlight
|
||||
;; This at the beginning of the file would be the alternative to highlight
|
||||
;; only the interior of the environment
|
||||
;((environment
|
||||
;(begin
|
||||
|
|
@ -149,18 +149,18 @@
|
|||
((generic_command
|
||||
name:(generic_command_name) @_name
|
||||
arg: (_) @text.emphasis)
|
||||
(#match? @_name "^(\\textit|\\mathit)$"))
|
||||
(#match? @_name "^(\\\\textit|\\\\mathit)$"))
|
||||
|
||||
((generic_command
|
||||
name:(generic_command_name) @_name
|
||||
arg: (_) @text.strong)
|
||||
(#match? @_name "^(\\textbf|\\mathbf)$"))
|
||||
(#match? @_name "^(\\\\textbf|\\\\mathbf)$"))
|
||||
|
||||
((generic_command
|
||||
name:(generic_command_name) @_name
|
||||
.
|
||||
arg: (_) @text.uri)
|
||||
(#match? @_name "^(\\url|\\href)$"))
|
||||
(#match? @_name "^(\\\\url|\\\\href)$"))
|
||||
|
||||
(ERROR) @error
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue