aboutsummaryrefslogtreecommitdiffstats
path: root/queries/pascal
diff options
context:
space:
mode:
authorDaniil Leontev <d@leontiev.xyz>2025-02-20 12:17:32 +0100
committerGitHub <noreply@github.com>2025-02-20 12:17:32 +0100
commitd2ff4006418750aa8b91f280e66bdb623c891c95 (patch)
treef0d35114dc734f35e6fa47fd7d231a76f55100cf /queries/pascal
parentbot(lockfile): update pascal, v (diff)
downloadnvim-treesitter-d2ff4006418750aa8b91f280e66bdb623c891c95.tar
nvim-treesitter-d2ff4006418750aa8b91f280e66bdb623c891c95.tar.gz
nvim-treesitter-d2ff4006418750aa8b91f280e66bdb623c891c95.tar.bz2
nvim-treesitter-d2ff4006418750aa8b91f280e66bdb623c891c95.tar.lz
nvim-treesitter-d2ff4006418750aa8b91f280e66bdb623c891c95.tar.xz
nvim-treesitter-d2ff4006418750aa8b91f280e66bdb623c891c95.tar.zst
nvim-treesitter-d2ff4006418750aa8b91f280e66bdb623c891c95.zip
feat(promql): do not use regex for string labels (#7669)
In Prometheus, label values are treated as strings when used with the `=` and `!=` operators, and as regular expressions when used with the `=~` and `!~` operators. Injecting and then highlighting all label values as regex leads to a situation where entirely valid **string** label values containing regex special characters are mistakenly parsed and highlighted as regex. This results in syntax errors, causing labels to be highlighted incorrectly. For example, in `foo{bar=~"[a-z]{1,3}"}`, `{` and `}` are regex special characters, so regex highlighting is expected. However, in `foo{path="/foo/{id}"}`, `{` and `}` are just part of the string and have no special meaning, so the whole value should be highlighted as a string.
Diffstat (limited to 'queries/pascal')
0 files changed, 0 insertions, 0 deletions