Skip to content
This repository has been archived by the owner on May 9, 2021. It is now read-only.

Commit

Permalink
Successfully supporting options
Browse files Browse the repository at this point in the history
  • Loading branch information
twolfson committed Dec 14, 2014
1 parent 4d140a9 commit 8ce8198
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tasks/html-prettyprinter.js
Expand Up @@ -78,14 +78,14 @@ module.exports = function (grunt) {

// Read in the srcFiles, join, and beautify it
var srcBlob = grunt.helper('concat', srcFiles, {separator: separator}),
beautifiedContent = grunt.helper('html-prettyprinter', srcBlob);
beautifiedContent = grunt.helper('html-prettyprinter', srcBlob, data.options);

// Write out the content
grunt.file.write(dest, beautifiedContent);
});

grunt.registerHelper('html-prettyprinter', function prettyprintContent (content) {
var beautifiedContent = htmlPrettyprinter(content);
grunt.registerHelper('html-prettyprinter', function prettyprintContent (content, options) {
var beautifiedContent = htmlPrettyprinter(content, options || {});
return beautifiedContent;
});

Expand Down
1 change: 1 addition & 0 deletions test/grunt.js
Expand Up @@ -11,6 +11,7 @@ module.exports = function (grunt) {
src: ['test_files/file.html'],
dest: 'actual/file-tabs.html',
options: {
indent_size: 2,
indent_char: '\t'
}
}
Expand Down

0 comments on commit 8ce8198

Please sign in to comment.