-
Notifications
You must be signed in to change notification settings - Fork 51
backslash in string incorrectly escaping closing quote #13
Comments
@jlewis91 it's still happening in 0.17.0. It has not yet been fixed. |
Should it? You escape the quote, so it's still a string, right? |
|
Agree with @C-Bouthoorn. In Mysql it is. Looks like this is a parameter that can be set, but as a default, backslash can be used as an escape. See: https://dev.mysql.com/doc/refman/5.0/en/string-literals.html, look for |
Ok, since we're on this topic now: should language-sql support MySQL or just strictly SQL? There's another PR open right now (#16) that aims to remove MySQL comments. |
@aharpervc I'm sorry, I was confused with MySQL @50Wliu I think we should have a language-sql and language-mysql. MySQL has more differences from default SQL, of which this is one. See this page for differences. The struggle is how we're going to see when to use which one. |
Gotcha. Would it be possible to add a preferences toggle to select the sql flavor? It seems like it would be inefficient (also lousy from a user perspective) to fork out MySQL, given the large degree of shared components... |
I don't believe so, though it is possible to have multiple grammars in the same package (see language-c for a good example of this). |
Are the various grammars then distinguished based on the file's extension? |
@gontadu Correct. (Or, alternatively, a first-line match, though I don't think that's applicable to SQL) |
Example:

It should look like this (minus the space I added to hack the highlighting):

The text was updated successfully, but these errors were encountered: