<commit_before>var fs     = require('fs');
var jade   = require('jade');
var hogan  = require('hogan.js');


/*
 * File Attribute Regexes
 */
// //@ viewbridge
// //-@ viewbridge
JADE_ATTR = /\/\/-?\s*@\s*viewbridge\s*$/im;

// {{!@ viewbridge }}
HOGAN_ATTR = /\{\{!\s*@\s*viewbridge\s*\}\}/i


/*
 * Export
 */
var ENGINES = module.exports = {};


ENGINES.isSupported = function(name) {
  return !!~Object.keys(ENGINES).indexOf(name.toLowerCase());
};


/*
 * Jade
 */
ENGINES.jade = {
  ext:           '.jade'
, attrRegex:     JADE_ATTR
, compileConfig: {client: true, compileDebug: false}
, compile: function(tmpltext) {
    return jade.compile(tmpltext, this.compileConfig).toString();
  }
, runtime: function() {
    if (this.runtime.cache) return this.runtime.cache;
    return this.runtime.cache = fs.readFileSync('node_modules/jade/runtime.js', 'utf8');
  }
};


/*
 * Hogan
 */
ENGINES.hogan = {
  ext:           '.hjs'
, attrRegex:     HOGAN_ATTR
, compileConfig: {asString: true}
, compile: function(tmpltext) {
    var fnstring = hogan.compile(tmpltext, this.compileConfig);
    return [
      '(function() {'
    , '  var t = new Hogan.Template(' + fnstring + ');'
    , '  return function(data, partial) {'
    , '    return t.render(data, partial);'
    , '  };'
    , '})();'
    ].join('\n');
  }
, runtime: function() {
    if (this.runtime.cache) return this.runtime.cache;
    return this.runtime.cache = fs.readFileSync('node_modules/hogan.js/web/builds/2.0.0/template-2.0.0.js', 'utf8');
  }
};
<commit_msg>Comments added for regex change<commit_after>var fs     = require('fs');
var jade   = require('jade');
var hogan  = require('hogan.js');


/*
 * File Attribute Regexes
 *
 * Whitespace flexible with the '@' and 'viewbridge'
 * Eg, '@viewbridge', '@ viewbridge', multiline(eg, mustache), etc
 */
// //@ viewbridge
// //-@ viewbridge
JADE_ATTR = /\/\/-?\s*@\s*viewbridge\s*$/im;

// {{!@ viewbridge }}
// {{!
//   @viewbridge
// }}
HOGAN_ATTR = /\{\{!\s*@\s*viewbridge\s*\}\}/i


/*
 * Export
 */
var ENGINES = module.exports = {};


ENGINES.isSupported = function(name) {
  return !!~Object.keys(ENGINES).indexOf(name.toLowerCase());
};


/*
 * Jade
 */
ENGINES.jade = {
  ext:           '.jade'
, attrRegex:     JADE_ATTR
, compileConfig: {client: true, compileDebug: false}
, compile: function(tmpltext) {
    return jade.compile(tmpltext, this.compileConfig).toString();
  }
, runtime: function() {
    if (this.runtime.cache) return this.runtime.cache;
    return this.runtime.cache = fs.readFileSync('node_modules/jade/runtime.js', 'utf8');
  }
};


/*
 * Hogan
 */
ENGINES.hogan = {
  ext:           '.hjs'
, attrRegex:     HOGAN_ATTR
, compileConfig: {asString: true}
, compile: function(tmpltext) {
    var fnstring = hogan.compile(tmpltext, this.compileConfig);
    return [
      '(function() {'
    , '  var t = new Hogan.Template(' + fnstring + ');'
    , '  return function(data, partial) {'
    , '    return t.render(data, partial);'
    , '  };'
    , '})();'
    ].join('\n');
  }
, runtime: function() {
    if (this.runtime.cache) return this.runtime.cache;
    return this.runtime.cache = fs.readFileSync('node_modules/hogan.js/web/builds/2.0.0/template-2.0.0.js', 'utf8');
  }
};

{'fraction_non_alphanumeric': 0.19975224527717558, 'fraction_numerical': 0.004955094456488077, 'mean_word_length': 3.012422360248447, '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': '2523672', 'n_tokens_mistral': 1210, 'n_tokens_neox': 1185, 'n_words': 201}