-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Single-quoted variables not working for SQL highlighting #1509
Comments
I can reproduce it like this: SET @'quoted-variable' = 3; It seems to be a multiline issue. I will try to assemble a minimal example. |
Here you go: https://jsfiddle.net/zL9hbdo4/2/ |
Thank you for providing this example. |
While the simple example of SET @'quoted-variable' = 3;
SET @'quoted-variable' = 3; is now working correctly, due to a greedy matching bug (#1492) the other example is still not highlighted correctly. CREATE USER 'user'@'server-ip' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON scheme.* TO 'user'@'server-ip' WITH GRANT OPTION; |
I just tested with the last commit on my end and it works like a charm. Hope the fix makes it into the 1.16.0 👍 |
Behavior with quoted variables was incorrect for SQL. This fixes that issue by introducing a new regex for variables and making the current regex greedy. Fixes #1509.
According to the examples, the following should work, but it does not
SET @'quoted-variable' = 3;
All other quoted variable examples do work, i.e. the following:
The text was updated successfully, but these errors were encountered: