-
Notifications
You must be signed in to change notification settings - Fork 59
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
Syntax highlighting breaks when using $ in VALUES #237
Comments
Thanks for reporting. I think this has to do with the dollar quoting that has been introduced a couple of weeks ago. I will try to take a closer look. Btw.: your second example seems to have an additional ; in the second to last line. That might be one issue. |
https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-DOLLAR-QUOTING https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS |
You need to check if you not using too old version of a parser, I made fix exactly for that problem: #235. |
I'm using sqlc where multiple queries are written in a single sql file, from which code is then generated. Arguments are written as
$1
,$2
and so on. The dollar signs seem to break syntax highlighting.The following example shows the bug:
This results in the following:
![image](https://private-user-images.githubusercontent.com/753308/296857988-266a0613-0104-47c2-90fb-87a35b4d5862.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwOTYzMTMsIm5iZiI6MTczOTA5NjAxMywicGF0aCI6Ii83NTMzMDgvMjk2ODU3OTg4LTI2NmEwNjEzLTAxMDQtNDdjMi05MGZiLTg3YTM1YjRkNTg2Mi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjA5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIwOVQxMDEzMzNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT03MGUxY2JhMWQwM2M5YmI1YWQ2NTBiYjU5NThlOGFhODdkYzhkNDc3ZWVjN2ZiMTY4YmIwZWI3ZGY3MTQzNTUyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.eKHX2PcqmeRK7DS92su5FXyepB0G6660cHbZPsZaFrE)
Even with a single function, the
RETURNING
line breaks:The text was updated successfully, but these errors were encountered: