jQuery(function($) { var winURL = (window.URL || window.webkitURL); var objectURLs = {}; var saved_results = {}; var currentLessVars = {}; var less_parser = new(less.Parser)({}); $.ajax({url: "../assets/css/less/ace-features.less"}).done(function(less_file_data) { var sections = [] var regex = /\/\/~([\w\- \&]+)/gi; var matches; while ((matches = regex.exec(less_file_data)) !== null) { sections.push({'title' : matches[1] , 'index': matches.index}) } sections.push({'title' : 'EOF' , 'index': less_file_data.length}) var depend_on = {} var depend_off = {} $(sections).each(function(i, info) { if(info.title == 'EOF') return; var next_info = sections[i + 1]; var sub = less_file_data.substring(info.index + info.title.length + 4 , next_info.index - 1); sub = $.trim(sub); if(sub.length == 0) return; var vars = []; var regex = /@([\w\-]+)\:\s+([\w\d\'\"\@\-]+);(?:\/\/(.*))?/gi; var matches; while ((matches = regex.exec(sub)) !== null) { vars.push({'name': matches[1], 'value': matches[2], 'description': matches[3]}) } var section_name = info.title.toLowerCase().replace(/\W/g, ''); $('

').appendTo('#page-content'); var group = $('
').appendTo('#page-content'); $(vars).each(function(i, lessvar) { //lessvar.name //lessvar.value //lessvar.description var description = lessvar.description || ''; if(description == '!ignore') return; var label = $('