<commit_before>//	This file is part of the "jQuery.Syntax" project, and is licensed under the GNU AGPLv3.
//	Copyright 2010 <NAME>. All rights reserved.
//	See <jquery.syntax.js> for licensing details.

if (!RegExp.prototype.indexOf) {
	RegExp.indexOf = function (match, index) {
		return match[0].indexOf(match[index]) + match.index;
	};
}

if (!RegExp.prototype.escape) {
	RegExp.escape = function (pattern) {
		return pattern.replace(/[\-\[\]{}()*+?.\\\^$|,#\s]/g, "\\$&");
	};
}

if (!String.prototype.repeat) {
	String.prototype.repeat = function(l) {
		return new Array(l+1).join(this);
	};
}

// IE... doesn't understand zero width space correctly... thus this hodgepodge :/
// One plus - its fairly much contained to this function.
Syntax.breakWhitespace = function(s) {
	if ($.browser.safari || $.browser.firefox) {
		// For browsers that have been tested and support zero width space
		return s.replace(/&nbsp;/g, "&nbsp;&#x200B;").replace(/\n/g, "<br/>");
	} else {
		s = s.replace(/&nbsp;/g, "\u00a0").replace(/[\u00a0 ]+/g, function(m) {
			if (m.length == 1) {
				return " ";
			} else {
				return "\u00a0 ".repeat(Math.ceil(m.length / 2)).substr(0, m.length);
			}
		}).replace(/\n/g, "<br/>").replace(/\u00a0/g, "&nbsp;");
		
		if (s.charCodeAt(0) == " ".charCodeAt(0)) {
			s = s.replace(" ", "&nbsp;")<commit_msg>Fixed some minor syntax issues.<commit_after>//	This file is part of the "jQuery.Syntax" project, and is licensed under the GNU AGPLv3.
//	Copyright 2010 <NAME>. All rights reserved.
//	See <jquery.syntax.js> for licensing details.

if (!RegExp.prototype.indexOf) {
	RegExp.indexOf = function (match, index) {
		return match[0].indexOf(match[index]) + match.index;
	};
}

if (!RegExp.prototype.escape) {
	RegExp.escape = function (pattern) {
		return pattern.replace(/[\-\[\]{}()*+?.\\\^$|,#\s]/g, "\\$&");
	};
}

if (!String.prototype.repeat) {
	String.prototype.repeat = function(l) {
		return new Array(l+1).join(this);
	};
}

// IE... doesn't understand zero width space correctly... thus this hodgepodge :/
// One plus - its fairly much contained to this function.
Syntax.breakWhitespace = function(s) {
	if (jQuery.browser.safari || jQuery.browser.firefox) {
		// For browsers that have been tested and support zero width space
		return s.replace(/&nbsp;/g, "&nbsp;&#x200B;").replace(/\n/g, "<br/>");
	} else {
		s = s.replace(/&nbsp;/g, "\u00a0").replace(/[\u00a0 ]+/g, function(m) {
			if (m.length == 1) {
				return " ";
			} else {
				return "\u00a0 ".repeat(Math.ceil(m.length / 2)).substr(0, m.length);
			}
		}).replace(/\n/g, "<br/>").replace(/\u00a0/g, "&nbsp;");
		
		if (s.charCodeAt(0) == " ".charCodeAt(0)) {
			s = s.replace(" ", "&nbsp;");
{'fraction_non_alphanumeric': 0.2137291280148423, 'fraction_numerical': 0.020037105751391466, 'mean_word_length': 3.3766233766233764, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '2186359', 'n_tokens_mistral': 1061, 'n_tokens_neox': 966, 'n_words': 231}