diff --git a/syntaxes/cfml.sublime-syntax b/syntaxes/cfml.sublime-syntax index a31b2f4..924ae32 100644 --- a/syntaxes/cfml.sublime-syntax +++ b/syntaxes/cfml.sublime-syntax @@ -319,6 +319,8 @@ contexts: - include: scope:source.cfml.script#comments - include: scope:source.cfml.script#expressions sql-hash-delimiters: + - match: \\(?=#) + scope: constant.character.escape.sql - match: '##' scope: constant.character.escape.hash.cfml - match: '#' diff --git a/syntaxes/tests/syntax_test_cfml.cfm b/syntaxes/tests/syntax_test_cfml.cfm index 1b6bbfc..6aa46b1 100644 --- a/syntaxes/tests/syntax_test_cfml.cfm +++ b/syntaxes/tests/syntax_test_cfml.cfm @@ -50,6 +50,9 @@ <cfquery>SELECT * FROM #obj.property# WHERE s = '#obj.prop#'</cfquery> <!--- ^^^^^^^^ source.cfml.script source.sql source.cfml.script meta.property.cfml ---> <!--- ^^^^ source.cfml.script source.sql source.cfml.script meta.property.cfml ---> +<cfquery>BULK INSERT VAR1 FROM 'C:\#path#'</cfquery> +<!--- ^ source.sql string.quoted.single.sql constant.character.escape.sql ---> +<!--- ^ source.sql string.quoted.single.sql constant.character.hash.cfml.start ---> <cfscript> foo = 'hello world'; <!--- <- embedding.cfml text.html.cfml source.cfml.script variable.other.readwrite.cfml ---> @@ -78,4 +81,4 @@ myFunc().addVal(10); <!--- ^ embedding.cfml text.html.cfml source.cfml.script meta.function-call.cfml meta.function-call.parameters.cfml punctuation.definition.group.begin.cfml ---> <!--- ^ embedding.cfml text.html.cfml source.cfml.script meta.function-call.method.cfml ---> <!--- ^ embedding.cfml text.html.cfml source.cfml.script meta.function-call.method.cfml meta.function-call.parameters.method.cfml punctuation.definition.group.begin.cfml ---> -</cfscript> \ No newline at end of file +</cfscript>