<commit_before>var path = require('path'),
	_ = require('lodash'),
	util = require('./lib/util'),
	parseOptions = require('./lib/parseOptions'),

	// Used to reset lodash to default template settings
	lodashTemplateSettings = {
		evaluate: _.templateSettings.evaluate,
		interpolate: _.templateSettings.interpolate,
		escape: _.templateSettings.escape
	};

function makeCdnizer(opts) {
	"use strict";

	opts = parseOptions(opts);

	function cdnizer(contents) {

		var canAddFallback = opts.shouldAddFallback && contents.indexOf('<head') !== -1,
			didAddFallback = false;

		_.union(opts.matchers, util.matchers).forEach(function(m) {
			contents = contents.replace(m.pattern, function(match, pre, url, post) {
				var fileInfo = util.findFileInfo(url, opts), result, params;
				if(fileInfo) {
					result = pre;
					params = _.merge(util.getVersionInfo(fileInfo, opts), {
						defaultCDNBase: opts.defaultCDNBase,
						filepath: url,<commit_msg>Added comment about windows paths.<commit_after>var path = require('path'),
	_ = require('lodash'),
	util = require('./lib/util'),
	parseOptions = require('./lib/parseOptions'),

	// Used to reset lodash to default template settings
	lodashTemplateSettings = {
		evaluate: _.templateSettings.evaluate,
		interpolate: _.templateSettings.interpolate,
		escape: _.templateSettings.escape
	};

function makeCdnizer(opts) {
	"use strict";

	opts = parseOptions(opts);

	function cdnizer(contents) {

		var canAddFallback = opts.shouldAddFallback && contents.indexOf('<head') !== -1,
			didAddFallback = false;

		_.union(opts.matchers, util.matchers).forEach(function(m) {
			contents = contents.replace(m.pattern, function(match, pre, url, post) {
				var fileInfo = util.findFileInfo(url, opts), result, params;
				if(fileInfo) {
					result = pre;
					params = _.merge(util.getVersionInfo(fileInfo, opts), {
						defaultCDNBase: opts.defaultCDNBase,
						filepath: url,
						// the split/join is to fix Windows idiotic backward paths.
{'fraction_non_alphanumeric': 0.13236034222445897, 'fraction_numerical': 0.0010065425264217413, 'mean_word_length': 4.344086021505376, 'pattern_counts': {'":': 0, '<': 5, '<?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': '992712', 'n_tokens_mistral': 692, 'n_tokens_neox': 602, 'n_words': 136}