<commit_before>/*
 * grunt-html-prettyprinter
 * https://github.com/twolfson/grunt-html-prettyprinter
 *
 * Copyright (c) 2012 <NAME>
 * Licensed under the MIT license.
 */
var htmlPrettyprinter = require('html').prettyPrint;
module.exports = function (grunt) {

  // Please see the grunt documentation for more information regarding task and
  // helper creation: https://github.com/cowboy/grunt/blob/master/docs/toc.md

  // ==========================================================================
  // TASKS
  // ==========================================================================

  grunt.registerMultiTask('html-prettyprinter', 'Prettyprint HTML from src to dest', function () {
    // Collect the filepaths we need
    var file = this.file,
        src = file.src,
        srcFiles = grunt.file.expand(src),
        dest = file.dest;

    // Read in the srcFiles, join, and beautify it
    var srcContent = srcFiles.map(grunt.file.read),
        srcBlob = srcContent.join('\n'),
        beautifiedContent = grunt.helper('html-prettyprinter', srcBlob);

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

  // ==========================================================================
  // HELPERS
  // ==========================================================================

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

};<commit_msg>Took a few notes from grunt/tasks/concat<commit_after>/*
 * grunt-html-prettyprinter
 * https://github.com/twolfson/grunt-html-prettyprinter
 *
 * Copyright (c) 2012 <NAME>
 * Licensed under the MIT license.
 */
var htmlPrettyprinter = require('html').prettyPrint;
module.exports = function (grunt) {

  // Please see the grunt documentation for more information regarding task and
  // helper creation: https://github.com/cowboy/grunt/blob/master/docs/toc.md

  // ==========================================================================
  // TASKS
  // ==========================================================================

  grunt.registerMultiTask('html-prettyprinter', 'Prettyprint HTML from src to dest', function () {
    // Collect the filepaths we need
    var file = this.file,
        data = this.data,
        src = file.src,
        srcFiles = grunt.file.expand(src),
        separator = data.separator || '\n',
        dest = file.dest;

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

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

    // Fail task if errors were logged.
    if (this.errorCount) { return false; }

    // Otherwise, print a success message.
    grunt.log.writeln('File "' + this.file.dest + '" created.');
  });

  // ==========================================================================
  // HELPERS
  // ==========================================================================

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

};
{'fraction_non_alphanumeric': 0.28724380544509026, 'fraction_numerical': 0.002447231569287244, 'mean_word_length': 3.8588410104011888, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2105659', 'n_tokens_mistral': 910, 'n_tokens_neox': 826, 'n_words': 201}