<commit_before>'use strict';

var fs      = require('fs');
var hljs    = require('../build');
var jsdom   = require('jsdom').jsdom;
var utility = require('./utility');

var filename = utility.buildPath('index.html'),
    page     = fs.readFileSync(filename, 'utf-8');

// Allows hljs to use document
global.document = jsdom(page);

// Setup hljs environment
var blocks = document.querySelectorAll('pre code');

hljs.configure({ tabReplace: '    ' });
[].forEach.call(blocks, hljs.highlightBlock);
<commit_msg>Use initHighlighting instead of the manual setup<commit_after>'use strict';

var fs      = require('fs');
var hljs    = require('../build');
var jsdom   = require('jsdom').jsdom;
var utility = require('./utility');

var filename = utility.buildPath('index.html'),
    page     = fs.readFileSync(filename, 'utf-8');

// Allows hljs to use document
global.document = jsdom(page);

// Setup hljs environment
hljs.configure({ tabReplace: '    ' });
hljs.initHighlighting();

{'fraction_non_alphanumeric': 0.16547497446373852, 'fraction_numerical': 0.0020429009193054137, 'mean_word_length': 4.130890052356021, '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': '5726336', 'n_tokens_mistral': 311, 'n_tokens_neox': 305, 'n_words': 77}