From 9ec03c7aacb93226169786544a3cb6edbf65a9ed Mon Sep 17 00:00:00 2001 From: AndrewBasem1 <102801029+AndrewBasem1@users.noreply.github.com> Date: Mon, 26 Sep 2022 20:29:39 +0200 Subject: [PATCH] Adding support for mySQL mySQL queries will fail with the '--sql' tag on top, because mySQL comments requires at least one space between the double dash and text after '-- sql', so added this as well. --- syntaxes/highlight-sql-string.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/syntaxes/highlight-sql-string.json b/syntaxes/highlight-sql-string.json index 50ad41e..2c4c923 100644 --- a/syntaxes/highlight-sql-string.json +++ b/syntaxes/highlight-sql-string.json @@ -5,8 +5,8 @@ "injectionSelector": "L:string.quoted.multi.python, L:meta.fstring.python - (comment.line.number-sign.python, punctuation.definition.comment.python)", "patterns": [ { - "begin": "( *--sql| *--beginsql| *--begin-sql)", - "end": "( *;| *--endsql| *--end-sql)", + "begin": "( *--sql| *--beginsql| *--begin-sql| *-- sql| *-- beginsql| *-- begin-sql)", + "end": "( *;| *--endsql| *--end-sql| * ;| *-- endsql| *-- end-sql)", "captures": { "1": { "name": "variable.parameter" @@ -20,4 +20,4 @@ } ], "scopeName": "python-sql.injection" -} \ No newline at end of file +}