This repository has been archived on 2024-06-20. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
coffee.pygments/tests/snippets/promql/test_complex_exp_single_quotes.txt
Pablo Seminario 9ea4c265fe
Improve PromQL lexer with new test cases (#1783)
* Fix PromQL lexer to support values enclosed within single quotes

Values for labels could now be enclosed within single or double quotes.

* Fix a typo into the lables regex for PromQL lexer

The correct label matching operator is `!~` instead of `~!`.
2021-04-24 08:00:37 +02:00

35 lines
889 B
Text

---input---
(sum(rate(metric_test_app{app='turtle',proc='web'}[2m])) by(node))
---tokens---
'(' Operator
'sum' Keyword
'(' Operator
'rate' Keyword.Reserved
'(' Operator
'metric_test_app' Name.Variable
'{' Punctuation
'app' Name.Label
'=' Operator
"'" Punctuation
'turtle' Literal.String
"'" Punctuation
',' Punctuation
'proc' Name.Label
'=' Operator
"'" Punctuation
'web' Literal.String
"'" Punctuation
'}' Punctuation
'[' Punctuation
'2m' Literal.String
']' Punctuation
')' Operator
')' Operator
' ' Text.Whitespace
'by' Keyword
'(' Operator
'node' Name.Variable
')' Operator
')' Operator
'\n' Text.Whitespace