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

Add PromQL language support #2628

Merged
merged 9 commits into from
Nov 12, 2020
Merged

Conversation

arendjr
Copy link
Contributor

@arendjr arendjr commented Nov 10, 2020

Copy link
Member

@RunDevelopment RunDevelopment left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR @arendjr!

I gave your PR a quick look and left you some comments. I'll give it a more in-depth review later.

Additional notes:

  • We only use single-quoted strings
  • Please quote all token names (e.g. 'comment', 'range-duration', etc) (like here).
  • Please use an IIFE to fix global namespace pollution (like here).

components/prism-promql.js Outdated Show resolved Hide resolved
components/prism-promql.js Outdated Show resolved Hide resolved
components/prism-promql.js Outdated Show resolved Hide resolved
components/prism-promql.js Outdated Show resolved Hide resolved
components/prism-promql.js Outdated Show resolved Hide resolved
components/prism-promql.js Outdated Show resolved Hide resolved
components/prism-promql.js Outdated Show resolved Hide resolved
tests/languages/promql/time_series_selection.test Outdated Show resolved Hide resolved
tests/languages/promql/subquery_selection.test Outdated Show resolved Hide resolved
tests/languages/promql/aggregate_selection.test Outdated Show resolved Hide resolved
@arendjr
Copy link
Contributor Author

arendjr commented Nov 10, 2020

Thanks for the thorough feedback already! I have addressed the styling issues, split keywords and functions as appropriate, simplified some things and added another comment to address one of your questions :) To be honest, I'm not sure about all the original motivations, as I reused some code from the Monaco highlighter and the blog post I referenced, but thanks to your review, I think it's pretty cleaned up now.

@RunDevelopment
Copy link
Member

Thank you for the quick response!

I still have some minor nits but it's overall it looks really good now.

arendjr and others added 2 commits November 10, 2020 22:18
Co-authored-by: Michael Schmidt <mitchi5000.ms@googlemail.com>
Co-authored-by: Michael Schmidt <mitchi5000.ms@googlemail.com>
Copy link
Member

@RunDevelopment RunDevelopment left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rebuild, so I can merge.

@arendjr
Copy link
Contributor Author

arendjr commented Nov 12, 2020

Done!

@RunDevelopment RunDevelopment merged commit 8831c70 into PrismJS:master Nov 12, 2020
@RunDevelopment
Copy link
Member

Thank you for contributing @arendjr!

@arendjr
Copy link
Contributor Author

arendjr commented Nov 12, 2020

Thanks for your support! 🚀

This was referenced Mar 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants