diff --git a/CoffeeScript.sublime-syntax b/CoffeeScript.sublime-syntax index 7eb2cc4..3320bba 100644 --- a/CoffeeScript.sublime-syntax +++ b/CoffeeScript.sublime-syntax @@ -513,11 +513,18 @@ contexts: pop: 1 backtick-quoted-strings: + - match: \`{3} + scope: meta.string.heredoc.coffee string.quoted.script.coffee punctuation.definition.string.begin.coffee + embed: scope:source.jsx + embed_scope: meta.string.heredoc.coffee meta.embedded.coffee source.jsx.embedded.coffee + escape: '{{no_escape_behind}}`{3}' + escape_captures: + 0: meta.string.heredoc.coffee string.quoted.script.coffee punctuation.definition.string.end.coffee - match: \` scope: meta.string.coffee string.quoted.script.coffee punctuation.definition.string.begin.coffee embed: scope:source.jsx embed_scope: meta.string.coffee meta.embedded.coffee source.jsx.embedded.coffee - escape: \` + escape: '{{no_escape_behind}}`' escape_captures: 0: meta.string.coffee string.quoted.script.coffee punctuation.definition.string.end.coffee @@ -764,6 +771,10 @@ variables: ascii_space: '\t\n\f ' + # A lookbehind used in embed..escape patterns, to check for unescaped characters + # in embed...escape statements. + no_escape_behind: (?Hello {World}) +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.string.heredoc.coffee meta.embedded.coffee source.jsx.embedded.coffee - source.jsx source.jsx +# ^^^^^^^^^^^^^^^^^^^^^^ meta.group.js meta.jsx.js +# ^^^^ meta.tag +# ^^^^^ meta.tag + ``` +# <- meta.string.heredoc.coffee meta.embedded.coffee source.jsx.embedded.coffee - string +#^ meta.string.heredoc.coffee meta.embedded.coffee source.jsx.embedded.coffee - string +# ^^^ meta.string.heredoc.coffee string.quoted.script.coffee punctuation.definition.string.end.coffee # ^ - meta.string - string `