Permalink
Browse files

added handlebars comments

  • Loading branch information...
1 parent a3dc93f commit 90efbe76f2ef08ff200859e506682c1b44fe7263 @nrw committed Jul 12, 2012
Showing with 79 additions and 1 deletion.
  1. +2 −1 .gitignore
  2. +30 −0 Comments.tmPreferences
  3. +16 −0 Handlebars.JSON-tmLanguage
  4. +31 −0 Handlebars.tmLanguage
View
@@ -1 +1,2 @@
-*.tmLanguage.cache
+*.tmLanguage.cache
+*.cache
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>name</key>
+ <string>Comments</string>
+ <key>scope</key>
+ <string>text.html.handlebars</string>
+ <key>settings</key>
+ <dict>
+ <key>shellVariables</key>
+ <array>
+ <dict>
+ <key>name</key>
+ <string>TM_COMMENT_START</string>
+ <key>value</key>
+ <string>{{! </string>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>TM_COMMENT_END</string>
+ <key>value</key>
+ <string> }}</string>
+ </dict>
+ </array>
+ </dict>
+ <key>uuid</key>
+ <string>BFDF17F6-F4B8-408C-96A4-512AF7B5CC70</string>
+</dict>
+</plist>
@@ -8,12 +8,28 @@
"foldingStopMarker": "(?x)(</(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|form|dl)>|^\\s*-->|(^|\\s)\\}|\\{\\{/)",
"patterns": [
+ { "include": "#comments" },
{ "include": "#partial_and_var" },
{ "include": "#block_helper" },
{ "include": "#end_block" },
{ "include": "#html_tags" }
],
"repository": {
+ "comments" : {
+ "patterns": [
+ { "name" : "comment.block.handlebars",
+ "begin" : "\\{\\{!",
+ "end" : "\\}\\}",
+ "patterns" : [
+ {
+ "name" : "keyword.annotation.handlebars",
+ "match" : "@\\w*"
+ },
+ { "include": "#comments" }
+ ]
+ }
+ ]
+ },
"partial_and_var": {
"name": "meta.function.inline.other.handlebars",
"begin": "(\\{\\{\\{*>*)\\s*([a-zA-Z_-]+)",
View
@@ -17,6 +17,10 @@
<array>
<dict>
<key>include</key>
+ <string>#comments</string>
+ </dict>
+ <dict>
+ <key>include</key>
<string>#partial_and_var</string>
</dict>
<dict>
@@ -80,6 +84,33 @@
</dict>
</array>
</dict>
+ <key>comments</key>
+ <dict>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>begin</key>
+ <string>\{\{!</string>
+ <key>end</key>
+ <string>\}\}</string>
+ <key>name</key>
+ <string>comment.block.handlebars</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>match</key>
+ <string>@\w*</string>
+ <key>name</key>
+ <string>keyword.annotation.handlebars</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#comments</string>
+ </dict>
+ </array>
+ </dict>
+ </array>
+ </dict>
<key>end_block</key>
<dict>
<key>begin</key>

0 comments on commit 90efbe7

Please sign in to comment.