Skip to content
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

Fix escape characters inside strings #17427

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 6 additions & 65 deletions syntaxes/SQL.plist
Original file line number Diff line number Diff line change
Expand Up @@ -667,33 +667,12 @@
<dict>
<key>patterns</key>
<array>
<dict>
<key>captures</key>
<dict>
<key>2</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.sql</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.sql</string>
</dict>
</dict>
<key>comment</key>
<string>this is faster than the next begin/end rule since sub-pattern will match till end-of-line and SQL files tend to have very long lines.</string>
<key>match</key>
<string>(N)?(')[^']*(')</string>
<key>name</key>
<string>string.quoted.single.sql</string>
</dict>
<dict>
<key>begin</key>
<string>'</string>
<string>N?(')</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.sql</string>
Expand All @@ -719,27 +698,6 @@
</dict>
</array>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.sql</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.sql</string>
</dict>
</dict>
<key>comment</key>
<string>this is faster than the next begin/end rule since sub-pattern will match till end-of-line and SQL files tend to have very long lines.</string>
<key>match</key>
<string>(`)[^`\\]*(`)</string>
<key>name</key>
<string>string.quoted.other.backtick.sql</string>
</dict>
<dict>
<key>begin</key>
<string>`</string>
Expand Down Expand Up @@ -771,27 +729,6 @@
</dict>
</array>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.sql</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.sql</string>
</dict>
</dict>
<key>comment</key>
<string>this is faster than the next begin/end rule since sub-pattern will match till end-of-line and SQL files tend to have very long lines.</string>
<key>match</key>
<string>(")[^"#]*(")</string>
<key>name</key>
<string>string.quoted.double.sql</string>
</dict>
<dict>
<key>begin</key>
<string>"</string>
Expand All @@ -817,6 +754,10 @@
<string>string.quoted.double.sql</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#string_escape</string>
</dict>
<dict>
<key>include</key>
<string>#string_interpolation</string>
Expand Down