Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Basic TextMate language grammar for Selleck HTML/Mustache files.

  • Loading branch information...
commit 76d5dd616181885e2de07431dd77c12f302b12b8 1 parent 2fdc1d5
Ryan Grove authored
Showing with 68 additions and 0 deletions.
  1. +68 −0 contrib/textmate/selleck.tmLanguage
68 contrib/textmate/selleck.tmLanguage
View
@@ -0,0 +1,68 @@
+{ scopeName = 'text.html.mustache.selleck';
+ fileTypes = ('mustache');
+ foldingStartMarker = '(?x)
+ (<(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|form|dl)\b.*?>
+ |<!--(?!.*-->)
+ |\{\s*($|\?>\s*$|//|/\*(.*\*/\s*$|(?!.*?\*/)))
+ |^[^\S\n]*(```)[^\S\n]*(.+?)?$
+ )';
+ foldingStopMarker = '(?x)
+ (</(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|form|dl)>
+ |^\s*-->
+ |(^|\s)\}
+ |^[^\S\n]*(```)[^\S\n]*$
+ )';
+ patterns = (
+ { include = '#block'; },
+ { include = '#inline'; },
+ { include = '#mustache'; },
+ { include = 'text.html.basic'; },
+ );
+ repository = {
+ block = {
+ patterns = (
+ { include = '#code-block'; },
+ );
+ };
+ code-block = {
+ name = 'markup.raw.block.selleck';
+ begin = '^[^\S\n]*(```)[^\S\n]*(.+?)?$';
+ end = '^[^\S\n]*(```)[^\S\n]*$';
+ beginCaptures = {
+ 1 = { name = 'punctuation.definition.code.selleck'; };
+ 2 = { name = 'punctuation.definition.code.selleck'; };
+ };
+ endCaptures = { 1 = { name = 'punctuation.definition.code.selleck'; }; };
+ patterns = (
+ { include = '#mustache'; },
+ );
+ };
+ code-inline = {
+ name = 'markup.raw.inline.selleck';
+ match = '(`)(.+?)(`)';
+ captures = {
+ 1 = { name = 'punctuation.definition.code.selleck'; };
+ 3 = { name = 'punctuation.definition.code.selleck'; };
+ };
+ };
+ inline = {
+ patterns = (
+ { include = '#code-inline'; },
+ // { include = '#link'; }
+ );
+ };
+ mustache = {
+ patterns = (
+ { name = 'comment.block.mustache';
+ begin = '\{\{!';
+ end = '\}\}';
+ },
+ { name = 'source.mustache.embedded.html';
+ begin = '\{\{[{<>#/]?';
+ end = '\}?\}\}';
+ captures = { 0 = { name = 'entity.name.tag.mustache'; }; };
+ },
+ );
+ };
+ };
+}
Please sign in to comment.
Something went wrong with that request. Please try again.