<commit_before>function applyReplacements(node) {
    var gReplacements = ["teste", "velocidade", "não habilitados"];
    var gBannedTags = ["STYLE", "SCRIPT", "NOSCRIPT", "TEXTAREA"];

	// Ignore any node whose tag is banned
	if( !node || $.inArray( node.tagName, gBannedTags ) !== -1 ) { return };

	try 
	{
		$(node).contents().each(function(i, v) {
			// Ignore any child node that has been replaced already or doesn't contain text
			if( v.isReplaced || v.nodeType !== Node.TEXT_NODE ) { return };

			// Apply each replacement in order
			gReplacements.forEach( function(replacement) {
				//if( !replacement.active ) return;
                var matchedText = v.textContent.match(new RegExp(replacement, "i"));

                if (matchedText) {
                    // Use `` instead of '' or "" if you want to use ${variable} inside a string
                    // For more information visit https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals
                    var replacedText = node.innerHTML.replace(new RegExp(`(${replacement})`, "i"), "<span class='toHighlight' style=\"background-color: yellow\">$1</span>");

                    node.innerHTML = replacedText;
                }
			});

			v.isReplaced = true;
		});
	} catch( err ) {
		// Basically this means that an iframe had a cross-domain source, and WR can't do much about it.
		if( err.name === "SecurityError" ) {} 
		else {throw err};
	}<commit_msg>Minor updates<commit_after>function applyReplacements(node) {
    var gReplacements = ["teste", "velocidade", "não habilitados"];
    var gBannedTags = ["STYLE", "SCRIPT", "NOSCRIPT", "TEXTAREA"];

	// Ignore any node whose tag is banned
	if( !node || $.inArray( node.tagName, gBannedTags ) !== -1 ) { return; }

	try 
	{
		$(node).contents().each(function(i, v) {
			// Ignore any child node that has been replaced already or doesn't contain text
			if( v.isReplaced || v.nodeType !== Node.TEXT_NODE ) { return; }

			// Apply each replacement in order
			gReplacements.forEach( function(replacement) {
				//if( !replacement.active ) return;
                var matchedText = v.textContent.match(new RegExp(replacement, "i"));

                if (matchedText) {
                    // Use `` instead of '' or "" if you want to use ${variable} inside a string
                    // For more information visit https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals
                    var replacedText = node.innerHTML.replace(new RegExp(`(${replacement})`, "i"), "<span class='toHighlight' style=\"background-color: yellow\">$1</span>");

                    node.innerHTML = replacedText;
                }
			});

			v.isReplaced = true;
		});
	} catch( err ) {
		// Basically this means that an iframe had a cross-domain source, and WR can't do much about it.
		if( err.name !== "SecurityError" )
		{ throw err; }
	}
{'fraction_non_alphanumeric': 0.1430044688896528, 'fraction_numerical': 0.0013750429700928155, 'mean_word_length': 2.6975857687420586, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, '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': '3251246', 'n_tokens_mistral': 943, 'n_tokens_neox': 844, 'n_words': 244}