diff options
| author | Stephan Seitz <stephan.seitz@fau.de> | 2021-05-12 00:28:27 +0200 |
|---|---|---|
| committer | Stephan Seitz <stephan.lauf@yahoo.de> | 2021-05-12 01:12:24 +0200 |
| commit | efbb1c66d27eb5b4bfbcc1f59d3384e0641c8214 (patch) | |
| tree | 7c5fbfde112da43b71d07ac892462e27f89d8c9e /queries | |
| parent | Update lockfile.json (diff) | |
| download | nvim-treesitter-efbb1c66d27eb5b4bfbcc1f59d3384e0641c8214.tar nvim-treesitter-efbb1c66d27eb5b4bfbcc1f59d3384e0641c8214.tar.gz nvim-treesitter-efbb1c66d27eb5b4bfbcc1f59d3384e0641c8214.tar.bz2 nvim-treesitter-efbb1c66d27eb5b4bfbcc1f59d3384e0641c8214.tar.lz nvim-treesitter-efbb1c66d27eb5b4bfbcc1f59d3384e0641c8214.tar.xz nvim-treesitter-efbb1c66d27eb5b4bfbcc1f59d3384e0641c8214.tar.zst nvim-treesitter-efbb1c66d27eb5b4bfbcc1f59d3384e0641c8214.zip | |
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)
Diffstat (limited to 'queries')
| -rw-r--r-- | queries/latex/highlights.scm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/queries/latex/highlights.scm b/queries/latex/highlights.scm index bd89c4a45..b67659a34 100644 --- a/queries/latex/highlights.scm +++ b/queries/latex/highlights.scm @@ -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 |
