Closed denysonique closed 3 years ago
VS Code uses TextMate grammars as the syntax tokenization engine. In 12.2 Language Rules of the TextMate document language_grammars says that: and in next section, it says So it is impossible to match the multi-line beginning.
What's more, there may be some mis-highlighting if `
is used in SQL, while ;
is easily appended to any SQL. They are the reasons why I choose ;
as the end expression.
NodeJS libraries allow executing SQL queries by passing a non-delimeted string such as below:
However the below pattern used for matching requires a semi-colon:
I tried adding a leading backtick:
which seems to work, however by adding the backtick I loose the option to precede the query with a newline for formating of longer queries:
If I try to solve this by only adding a backtick to the "end" value, syntax highlihgting brakes for anything below.
What is the best solution to be able to have all strings beginning with a
`
followed by newline + whitespace and then SELECT or other keywoard to be fully highlighted without having to delimit them with a;