Automatic SQL injection in JavaScript comments

Answered

Hi,

I'm adding SQL statements in my JavaScript comments for documentation and for running these inline queries. I can manually inject SQL language, but I would like the IDE to automatically detect SQL in comments. Here's an example.

You can see that the SQL statement is not recognized in the comment, but it is automatically recognized in the string literal assigned to the "query" prop. I don't need the query prop, it's just here for example.

I tried to guess a custom "Places Pattern" to fix this, but I don't have the IntelliJ internals knowledge, so I failed ;-)

Can this be done?

0
2 comments

Thanks for your response! I added my vote to the related tickets.

0

Please sign in to leave a comment.