Skip to content

Commit

Permalink
Set as function because of highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
cedeber committed May 31, 2017
1 parent b4e044a commit 12062f1
Showing 1 changed file with 19 additions and 29 deletions.
48 changes: 19 additions & 29 deletions syntax/mustache.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -18,53 +18,43 @@ contexts:
pop: true
# Partial
- match: "{{(?=\\s*>)"
scope: storage.type.function.mustache
scope: storage.type.other.mustache
push:
- meta_content_scope: variable.parameter.mustache
- match: ">"
scope: keyword.control.import.mustache
- match: "}}"
scope: storage.type.function.mustache
scope: storage.type.other.mustache
pop: true
# (Inverted) Section
- match: "{{(?=\\s*[#^/=])"
- match: ">"
scope: keyword.control.import.mustache
# (Inverted) Section && Unescaped Variable
- match: "{{(?=\\s*[#^/=&])"
scope: storage.type.function.mustache
push:
- meta_content_scope: variable.parameter.mustache
- match: "[#^/&=]"
scope: entity.name.function.mustache
- match: \.
scope: keyword.operator.accessor.mustache
- match: "}}"
scope: storage.type.function.mustache
pop: true
# Unescaped Variable
- match: "{{(?=\\s*&)"
scope: storage.type.function.mustache
push:
- meta_content_scope: constant.other.placeholder.mustache
- match: "&"
- match: "[#^=/&]"
scope: entity.name.function.mustache
- match: \.
- match: "\\."
scope: keyword.operator.accessor.mustache
- match: "}}"
scope: storage.type.function.mustache
pop: true
# Unescaped Variable - shortcut
# Unescaped Variable
- match: "{{{"
scope: entity.name.function.mustache
scope: variable.function.mustache
push:
- meta_content_scope: constant.language.other.mustache
- meta_content_scope: variable.parameter.mustache
- match: "}}}"
scope: entity.name.function.mustache
scope: variable.function.mustache
pop: true
- match: \.
scope: keyword.operator.accessor.mustache
# Escaped Variable
- match: "{{"
scope: storage.type.function.mustache
scope: variable.function.mustache
push:
- meta_content_scope: constant.language.other.mustache
- match: \.
scope: keyword.operator.accessor.mustache
- meta_content_scope: variable.parameter.mustache
- match: "}}"
scope: storage.type.function.mustache
scope: variable.function.mustache
pop: true
- match: \.
scope: keyword.operator.accessor.mustache

0 comments on commit 12062f1

Please sign in to comment.