<commit_before>(function() {
	"use strict";
	
	var ContentEditableUtils = function() {
	};
	
	ContentEditableUtils.prototype.replaceSelectedText = function(replacementText) {
		var range = null;
		if (window.getSelection) {
			var selection = window.getSelection();
			if (selection.rangeCount) {
				range = selection.getRangeAt(0);
				range.deleteContents();
				range.insertNode(document.createTextNode(replacementText));
				selection.addRange(range);
				selection.collapseToEnd();
			}
		} else if (document.selection && document.selection.createRange) {
			range = document.selection.createRange();
			range.text = replacementText;
		}
	};

	ContentEditableUtils.prototype.getTextFromContentEditable = function(contentEditable) {
		var pre = $("<pre/>").html(contentEditable.html());
		if ($.browser.webkit) {
			pre.find("div").replaceWith(function() { return "\n" + this.innerHTML; });
		} else if ($.browser.msie)
			pre.find("p").replaceWith(function() { return this.innerHTML + "<br>"; });
		else if ($.browser.mozilla || $.browser.opera || $.browser.msie) {
			pre.find("br").replaceWith("\n");
		}
		return pre.text();
	};

	// Export
	window.io.hike.ContentEditableUtils = ContentEditableUtils;
}
)();<commit_msg>Trim content editable text.<commit_after>(function() {
	"use strict";
	
	var ContentEditableUtils = function() {
	};
	
	ContentEditableUtils.prototype.replaceSelectedText = function(replacementText) {
		var range = null;
		if (window.getSelection) {
			var selection = window.getSelection();
			if (selection.rangeCount) {
				range = selection.getRangeAt(0);
				range.deleteContents();
				range.insertNode(document.createTextNode(replacementText));
				selection.addRange(range);
				selection.collapseToEnd();
			}
		} else if (document.selection && document.selection.createRange) {
			range = document.selection.createRange();
			range.text = replacementText;
		}
	};

	ContentEditableUtils.prototype.getTextFromContentEditable = function(contentEditable) {
		var pre = $("<pre/>").html(contentEditable.html());
		if ($.browser.webkit) {
			pre.find("div").replaceWith(function() { return "\n" + this.innerHTML; });
		} else if ($.browser.msie)
			pre.find("p").replaceWith(function() { return this.innerHTML + "<br>"; });
		else if ($.browser.mozilla || $.browser.opera || $.browser.msie) {
			pre.find("br").replaceWith("\n");
		}
		return pre.text().trim();
	};

	// Export
	window.io.hike.ContentEditableUtils = ContentEditableUtils;
}
)();
{'fraction_non_alphanumeric': 0.1653892698668818, 'fraction_numerical': 0.0008067769261799112, 'mean_word_length': 4.414847161572053, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '5033897', 'n_tokens_mistral': 856, 'n_tokens_neox': 754, 'n_words': 125}