From 733216a35e42ab0f9e8d79c1350c31674a36d74d Mon Sep 17 00:00:00 2001 From: Wliu <50Wliu@users.noreply.github.com> Date: Thu, 21 Sep 2017 22:23:05 +0200 Subject: [PATCH 1/2] WIP --- grammars/mustache.cson | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/grammars/mustache.cson b/grammars/mustache.cson index a038e9a..8e98c14 100644 --- a/grammars/mustache.cson +++ b/grammars/mustache.cson @@ -13,6 +13,23 @@ ] 'injections': 'L:text.html.mustache - (meta.tag.template.mustache | comment.block.mustache)': + 'patterns': [ + { + # This should be the only pattern here! + # Add everything else into #mustache below + 'include': '#mustache' + } + ] +'patterns': [ + { + 'include': 'text.html.basic' + } +] +'repository': + # The master pattern. All new patterns should be added here instead of in + # 'injections' to make including this language easier. + # See https://github.com/atom/language-mustache/issues/26 + 'mustache': 'patterns': [ { 'include': '#comment' @@ -30,12 +47,6 @@ 'include': '#template' } ] -'patterns': [ - { - 'include': 'text.html.basic' - } -] -'repository': 'comment': 'begin': '{{!' 'beginCaptures': From 71caf228070b3724c373e735ceaf79578314b414 Mon Sep 17 00:00:00 2001 From: Wliu <50Wliu@users.noreply.github.com> Date: Thu, 21 Sep 2017 22:26:02 +0200 Subject: [PATCH 2/2] Fix the SQL Mustache grammar --- grammars/sql with mustaches.cson | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grammars/sql with mustaches.cson b/grammars/sql with mustaches.cson index b5f8020..ec331cf 100644 --- a/grammars/sql with mustaches.cson +++ b/grammars/sql with mustaches.cson @@ -4,7 +4,7 @@ ] 'patterns': [ { - 'include': 'text.html.mustache' + 'include': 'text.html.mustache#mustache' } { 'include': 'source.sql'