<commit_before>define(['amd-loader', 'handlebars'], function(amdLoader, Handlebars) {
  var includeHelpers = /{{@([a-zA-Z-0-9\.\/\~]+)/g;
  return amdLoader('hbs', 'hbs', function(name, source, req, callback, errback, config) {
    // replace internal requires with helper form
    var sanitize = function(name) {
      return name.replace('/', '-').replace('.', '').replace('~', '_');
    }
    var helpers = [];
    source = source.replace(includeHelpers, function(match, dep) {
      helpers.push(dep);
      return '{{' + sanitize(dep);
    });
    // require the helpers
    helpers.unshift('handlebars.runtime');

    // return the compiled template
    var output = "define(" + JSON.stringify(helpers) + ", function(Handlebars) {\n"
      + "  Handlebars.registerHelper('" + sanitize(helpers[1]) + "', arguments[1]);\n"
      + "  var t = Handlebars.template(" + Handlebars.precompile(source) + "); \n"
      + "  return t;\n"
      + "});"<commit_msg>helper optional<commit_after>define(['amd-loader', 'handlebars'], function(amdLoader, Handlebars) {
  var includeHelpers = /{{@([a-zA-Z-0-9\.\/\~]+)/g;
  return amdLoader('hbs', 'hbs', function(name, source, req, callback, errback, config) {
    // replace internal requires with helper form
    var sanitize = function(name) {
      return name.replace('/', '-').replace('.', '').replace('~', '_');
    }
    var helpers = [];
    source = source.replace(includeHelpers, function(match, dep) {
      helpers.push(dep);
      return '{{' + sanitize(dep);
    });
    // require the helpers
    helpers.unshift('handlebars.runtime');

    // return the compiled template
    var output = "define(" + JSON.stringify(helpers) + ", function(Handlebars) {\n"
      + (helpers[1] ? "  Handlebars.registerHelper('" + sanitize(helpers[1]) + "', arguments[1]);\n" : "")
      + "  var t = Handlebars.template(" + Handlebars.precompile(source) + "); \n"
      + "  return t;\n"
      + "});"
{'fraction_non_alphanumeric': 0.2020618556701031, 'fraction_numerical': 0.004639175257731959, 'mean_word_length': 3.2942477876106193, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '1898041', 'n_tokens_mistral': 618, 'n_tokens_neox': 622, 'n_words': 126}