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

Fix single and multiline comment regex for GSQL #2002

Merged
merged 2 commits into from
Dec 28, 2021

Conversation

gregoryg
Copy link
Contributor

Prior to this change, multiline comments would get highlighted as GSQL code

Test:

   /* I use the GRAPH to add a vertex
       now let's create the graph
   */

Likewise, a comment added to the end of a GSQL line would cause the entire line to be interpreted as a comment
Test:

USE GRAPH Patents # switch to our new graph

Note: this commit also removed trailing spaces from several other lines in gsql.py

@Anteru
Copy link
Collaborator

Anteru commented Dec 28, 2021

Thanks! Would you mind adding this to the example file for GSQL so we can regression test it?

@gregoryg
Copy link
Contributor Author

gregoryg commented Dec 28, 2021

I'll do that - I'll add just a few lines to the existing example file

Edit - done and commit pushed. Previous example test.gsql differs in test output only in whitespace. I added new examples with end-of-line comments and multiline comments that include GSQL keywords in the comment text.

@Anteru
Copy link
Collaborator

Anteru commented Dec 28, 2021

Perfect, thanks a lot!

@Anteru Anteru merged commit 8e32528 into pygments:master Dec 28, 2021
@Anteru Anteru added this to the 2.11.0 milestone Dec 28, 2021
@Anteru
Copy link
Collaborator

Anteru commented Dec 28, 2021

Merged, thanks!

@gregoryg gregoryg deleted the gsql-comments-regex branch December 28, 2021 20:28
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