Skip to content

Instantly share code, notes, and snippets.

View kornelski's full-sized avatar
💤
Please be patient, it will take a while

Kornel kornelski

💤
Please be patient, it will take a while
View GitHub Profile
@kornelski
kornelski / HTML language
Created November 22, 2011 16:04
TextMate HTML language tweaked to support unqoted attributes
{ scopeName = 'text.html.basic';
firstLineMatch = '<!DOCTYPE|<(?i:html)|<\?(?i:php)';
fileTypes = ( 'html', 'htm', 'shtml', 'xhtml', 'phtml', 'php', 'inc', 'tmpl', 'tpl', 'ctp' );
foldingStartMarker = '(?x)
(<(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|li|form|dl)\b.*?>
|<!--(?!.*--\s*>)
|^<!--\ \#tminclude\ (?>.*?-->)$
|<\?(?:php)?.*\b(if|for(each)?|while)\b.+:
|\{\{?(if|foreach|capture|literal|foreach|php|section|strip)
|\{\s*($|\?>\s*$|//|/\*(.*\*/\s*$|(?!.*?\*/)))
(function(){
// prevent exceptions from escaping outside function (backtrace could be revealing)
try {
// this is ASCII 'Secret!' represented as integers
var secret = [1399153522,1702109440];
var secretlength = 7;
// function that contains secret must finish executing before anything untrusted is called,
// original (http://html5shiv.googlecode.com/svn/trunk/html5.js)
(function(){if(!/*@cc_on!@*/0)return;var e = "abbr,article,aside,audio,canvas,datalist,details,figure,figcaption,footer,header,hgroup,mark,menu,meter,nav,output,progress,section,summary,time,video".split(','),i=e.length;while(i--){document.createElement(e[i])}})()