Skip to content

Instantly share code, notes, and snippets.

@schinckel
Created January 11, 2012 10:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save schinckel/1594034 to your computer and use it in GitHub Desktop.
Save schinckel/1594034 to your computer and use it in GitHub Desktop.
Jekyll Syntax Grammar for TextMate
{ patterns = (
{ begin = '(---[ ]*\n)';
end = '(---[ ]*\n)';
name = 'source.yaml.header.markdown.jekyll';
patterns = ( { include = 'source.yaml'; } );
},
{ begin = '\{% +highlight +(js)( +linenos)? +%\}';
end = '\{% +endhighlight +%\}\n';
name = 'source.$1.embedded.html.markdown';
patterns = ( { include = 'source.js'; } );
},
{ begin = '\{% +highlight +(python)( +linenos)? +%\}\n';
end = '\{% +endhighlight +%\}\n';
name = 'source.$1.embedded.html.markdown';
patterns = ( { include = 'source.python'; } );
},
{ begin = '(\{% +(highlight) +(html)( +(linenos))? +%\})\n';
captures = {
1 = { name = 'meta.tag.liquid'; };
2 = { name = 'entity.name.tag.highlight.liquid'; };
3 = { name = 'entity.other.attribute.language'; };
5 = { name = 'entity.other.attribute.other'; };
};
contentName = 'source.$2.embedded.html.markdown';
end = '(\{% +(endhighlight) +%\})\n';
patterns = ( { include = 'text.html.basic'; } );
},
{ include = 'text.html.markdown'; },
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment