Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve PromQL lexer with new test cases #1783

Merged
merged 2 commits into from Apr 24, 2021

Conversation

pabluk
Copy link
Contributor

@pabluk pabluk commented Apr 23, 2021

This PR adds 2 minor improvements/fixes into the PromQL lexer:

  • Values for labels can now be enclosed within single or double quotes (only double quotes were supported before). Eg: metric{proc='web'} and metric{proc="web"} will work as expected. Initial report here.
  • There was a typo into the regex used for labels. Correct label matching operator is !~ instead of ~!. See the label matching operators documentation for more details.

Please feel free to ask for any changes, or edit it as you want. Thanks everyone for all the work done on Pygments!

Values for labels could now be enclosed within single or double quotes.
The correct label matching operator is `!~` instead of `~!`.
@Anteru
Copy link
Collaborator

Anteru commented Apr 24, 2021

Thanks for the contribution, merged!

@Anteru Anteru merged commit 9ea4c26 into pygments:master Apr 24, 2021
@Anteru Anteru added this to the 2.9 milestone Apr 24, 2021
@Anteru Anteru added the changelog-update Items which need to get mentioned in the changelog label Apr 24, 2021
@Anteru Anteru removed the changelog-update Items which need to get mentioned in the changelog label May 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants