Skip to content

Commit

Permalink
Merge 9a790fd into 5b06be3
Browse files Browse the repository at this point in the history
  • Loading branch information
james02135 committed Jan 16, 2020
2 parents 5b06be3 + 9a790fd commit 5f351c7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ module.exports = function(grunt) {
});

grunt.registerTask('build_standalone', '', function() {
var files, i, n, source, name, path, modules = [];
var i, n, source, name, path, modules = [];

// amd definitions must be changed to be not anonymous
// @see https://github.com/brianreavis/selectize.js/issues/89
Expand Down
14 changes: 7 additions & 7 deletions examples/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ $(function() {
var lines = code.split('\n');
var indent = null;

for (var i = 0; i < lines.length; i++) {
if (/^[ ]*$/.test(lines[i])) continue;
for (var j = 0; j < lines.length; j++) {
if (/^[ ]*$/.test(lines[j])) continue;
if (!indent) {
var lineindent = lines[i].match(/^([ ]+)/);
var lineindent = lines[j].match(/^([ ]+)/);
if (!lineindent) break;
indent = lineindent[1];
indent = lineindent[j];
}
lines[i] = lines[i].replace(new RegExp('^' + indent), '');
lines[j] = lines[j].replace(new RegExp('^' + indent), '');
}

var code = $.trim(lines.join('\n')).replace(/ /g, ' ');
var $pre = $('<pre>').addClass('js').text(code);
var code2 = $.trim(lines.join('\n')).replace(/ /g, ' ');
var $pre = $('<pre>').addClass('js').text(code2);
$pre.insertAfter(this);
}
});
Expand Down

0 comments on commit 5f351c7

Please sign in to comment.