Skip to content

Instantly share code, notes, and snippets.

@milcktoast
Forked from schinckel/file.plist
Created March 23, 2012 05:22
Show Gist options
  • Save milcktoast/2167200 to your computer and use it in GitHub Desktop.
Save milcktoast/2167200 to your computer and use it in GitHub Desktop.
Jekyll Syntax Grammar for TextMate
{ scopeName = 'text.html.jekyll';
foldingStartMarker = '(?x)
(<(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|form|dl)\b.*?>
|<!--(?!.*-->)
|\{\s*($|\?>\s*$|//|/\*(.*\*/\s*$|(?!.*?\*/)))
)';
foldingStopMarker = '(?x)
(</(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|form|dl)>
|^\s*-->
|(^|\s)\}
)';
patterns = (
{ name = 'source.liquid.tags.embedded.html';
begin = '({%)+(?!>)=?';
end = '(%})';
captures = {
1 = { name = 'meta.tag.liquid.embedded'; };
2 = { name = 'meta.tag.liquid.embedded'; };
};
patterns = (
{ name = 'keyword.control.liquid';
match = '\b(if|else|elseif|endif|while|for|in|return)\b';
},
{ include = 'source.ruby'; },
);
},
{ name = 'source.liquid.output.embedded.html';
begin = '({{)';
end = '(}})';
captures = {
1 = { name = 'meta.tag.liquid.output'; };
2 = { name = 'meta.tag.liquid.output'; };
};
patterns = ( { include = 'source.ruby'; } );
},
{ name = 'source.yaml.header.markdown.jekyll';
begin = '(---[ ]*\n)';
end = '(---[ ]*\n)';
patterns = ( { include = 'source.yaml'; } );
},
{ include = 'text.html.basic'; },
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment