Permalink
Browse files

fixed some exceptions

  • Loading branch information...
1 parent 8eb426d commit a699d59b61eaddb196849e12597226644c08ac9f @nrw committed Jul 13, 2012
Showing with 55 additions and 10 deletions.
  1. +15 −6 Handlebars.JSON-tmLanguage
  2. +40 −4 Handlebars.tmLanguage
View
21 Handlebars.JSON-tmLanguage
@@ -32,7 +32,7 @@
},
"partial_and_var": {
"name": "meta.function.inline.other.handlebars",
- "begin": "(\\{\\{\\{*>*)\\s*([a-zA-Z_\\.-]+)*",
+ "begin": "(\\{\\{\\{*>*)\\s*([-a-zA-Z_]+)*",
"end": "(\\}\\}\\}*)",
"beginCaptures": {
"1": { "name": "support.constant.handlebars" },
@@ -48,7 +48,7 @@
},
"block_helper": {
"name": "meta.function.block.start.handlebars.sproutcore",
- "begin": "(\\{\\{\\#)([a-zA-Z_\\.-]+)\\s*([a-zA-Z_\\.-]+)*",
+ "begin": "(\\{\\{\\#)([a-zA-Z_\\.-]+)\\s+([a-zA-Z_\\.-]+)*",
"end": "(\\}\\})",
"beginCaptures": {
@@ -90,9 +90,10 @@
"0": { "name": "punctuation.definition.string.end.html" }
},
"patterns": [
- { "include": "#partial_and_var" },
+ { "include": "#comments" },
{ "include": "#block_helper" },
- { "include": "#end_block" }
+ { "include": "#end_block" },
+ { "include": "#partial_and_var" }
]
},
"string_single_quoted": {
@@ -106,15 +107,19 @@
"0": { "name": "punctuation.definition.string.end.html" }
},
"patterns": [
- { "include": "#partial_and_var" },
+ { "include": "#comments" },
{ "include": "#block_helper" },
- { "include": "#end_block" }
+ { "include": "#end_block" },
+ { "include": "#partial_and_var" }
]
},
"tag_generic_attribute": {
"name": "entity.other.attribute-name.html",
"match": "\\b([a-zA-Z\\-:]+)",
"patterns": [
+ { "include": "#comments" },
+ { "include": "#block_helper" },
+ { "include": "#end_block" },
{ "include": "#partial_and_var" }
]
},
@@ -152,6 +157,10 @@
"0": { "name": "punctuation.definition.string.end.html" }
},
"patterns": [
+ { "include": "#comments" },
+ { "include": "#block_helper" },
+ { "include": "#end_block" },
+ { "include": "#partial_and_var" }
]
}
]
View
44 Handlebars.tmLanguage
@@ -41,7 +41,7 @@
<key>block_helper</key>
<dict>
<key>begin</key>
- <string>(\{\{\#)([a-zA-Z_\.-]+)\s*([a-zA-Z_\.-]+)*</string>
+ <string>(\{\{\#)([a-zA-Z_\.-]+)\s+([a-zA-Z_\.-]+)*</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
@@ -400,7 +400,7 @@
<key>partial_and_var</key>
<dict>
<key>begin</key>
- <string>(\{\{\{*&gt;*)\s*([a-zA-Z_\.-]+)*</string>
+ <string>(\{\{\{*&gt;*)\s*([-a-zA-Z_]+)*</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
@@ -466,7 +466,7 @@
<array>
<dict>
<key>include</key>
- <string>#partial_and_var</string>
+ <string>#comments</string>
</dict>
<dict>
<key>include</key>
@@ -476,6 +476,10 @@
<key>include</key>
<string>#end_block</string>
</dict>
+ <dict>
+ <key>include</key>
+ <string>#partial_and_var</string>
+ </dict>
</array>
</dict>
<key>string_single_quoted</key>
@@ -506,7 +510,7 @@
<array>
<dict>
<key>include</key>
- <string>#partial_and_var</string>
+ <string>#comments</string>
</dict>
<dict>
<key>include</key>
@@ -516,6 +520,10 @@
<key>include</key>
<string>#end_block</string>
</dict>
+ <dict>
+ <key>include</key>
+ <string>#partial_and_var</string>
+ </dict>
</array>
</dict>
<key>tag-id-attribute</key>
@@ -601,6 +609,22 @@
<string>string.quoted.single.html</string>
<key>patterns</key>
<array>
+ <dict>
+ <key>include</key>
+ <string>#comments</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#block_helper</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#end_block</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#partial_and_var</string>
+ </dict>
</array>
</dict>
</array>
@@ -615,6 +639,18 @@
<array>
<dict>
<key>include</key>
+ <string>#comments</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#block_helper</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#end_block</string>
+ </dict>
+ <dict>
+ <key>include</key>
<string>#partial_and_var</string>
</dict>
</array>

0 comments on commit a699d59

Please sign in to comment.