Skip to content

Commit

Permalink
Merge pull request #927 from Thom1729/javascript-no-mustache
Browse files Browse the repository at this point in the history
[JavaScript] Remove Mustache templating from JavaScript syntax.
  • Loading branch information
wbond committed Apr 27, 2017
2 parents 31d2872 + 19cd6d7 commit a10df6e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
10 changes: 1 addition & 9 deletions JavaScript/JavaScript.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ contexts:

statements:
- include: conditional
- match: '\{(?!\{)'
- match: '\{'
scope: punctuation.definition.block.js
push:
- meta_scope: meta.block.js
Expand Down Expand Up @@ -382,7 +382,6 @@ contexts:
- include: literal-prototype
- include: named-function
- include: anonymous-function
- include: mustache
- include: object-literal
- include: brackets
- include: literal-number
Expand Down Expand Up @@ -1014,13 +1013,6 @@ contexts:
1: entity.name.label.js
2: punctuation.separator.js

mustache:
- match: '\{\{'
push:
- meta_scope: meta.tag.mustache.js
- match: '\}\}'
pop: true

object-literal:
- match: '\{'
scope: punctuation.definition.block.js
Expand Down
5 changes: 1 addition & 4 deletions JavaScript/syntax_test_js.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,7 @@ a = test ? a + b : c;
// ^ variable.other.readwrite

{{foo}}
// ^ meta.tag.mustache.js
{{#bar}}{{/bar}}
// ^ meta.tag.mustache.js
// ^ meta.tag.mustache.js
// ^ meta.block meta.block variable.other.readwrite

var obj = {
// ^ meta.object-literal - meta.block
Expand Down

0 comments on commit a10df6e

Please sign in to comment.