<commit_before>'use strict';

function setPlaceholder(event) {
	document.getElementsByClassName('placeholderName')[0].getElementsByTagName('input')[0].value = event.getAttribute('title');
	var placeholderList = document.getElementById('placeholder-list');
	var elements = placeholderList.getElementsByTagName('a');

	for (var i = 0; i < elements.length; i++) {
		elements[i].className = '';
	}

	event.className += 'active';
}

function search(text) {
	var placeholderList = document.getElementById('placeholder-list');
	var elements = placeholderList.getElementsByTagName('a');

	for (var i = 0; i < elements.length; i++) {
		var currentElement = elements[i];
		var title = currentElement.getAttribute('title');
		var label = currentElement.innerHTML.toString();

		if (title && title.match(new RegExp(text, 'i')) !== null || label.match(new RegExp(text, 'i')) !== null) {
			currentElement.style.display = 'block';
		} else {
			currentElement.style.display = 'none';
		}
	}
}

function initializeList() {
	var placeholderList = document.getElementById('placeholder-list');
	var elements = placeholderList.getElementsByTagName('a');

	for (var i = 0; i < elements.length; i++) {
		elements[i].className = '';
		elements[i].style.display = 'block';
	}
}

CKEDITOR.dialog.add( 'placeholder2', function( editor ) {
	var validNameRegex = /^[^\[\]<>]+$/;
	var placeholderList = editor.config.placeholder2.placeholders.map(function(placeholder) {
		return '<a href="javascript:void(0)" onclick="setPlaceholder(this); return false;" title="'+
			placeholder.value +'">' + placeholder.label + '</a>';
	});


	return {
		title: 'Placeholder Properties',
		minWidth: 600,
		minHeight: 400,
		contents: [
			{
				id: 'placeholderGroups',
				label: 'Groups',
				title: 'Groups',
				elements: [
					{
						type: 'text',
						id: 'placeholderSearch',
						className: 'placeholderSearch',<commit_msg>allow gt and lt tags<commit_after>'use strict';

function setPlaceholder(event) {
	document.getElementsByClassName('placeholderName')[0].getElementsByTagName('input')[0].value = event.getAttribute('title');
	var placeholderList = document.getElementById('placeholder-list');
	var elements = placeholderList.getElementsByTagName('a');

	for (var i = 0; i < elements.length; i++) {
		elements[i].className = '';
	}

	event.className += 'active';
}

function search(text) {
	var placeholderList = document.getElementById('placeholder-list');
	var elements = placeholderList.getElementsByTagName('a');

	for (var i = 0; i < elements.length; i++) {
		var currentElement = elements[i];
		var title = currentElement.getAttribute('title');
		var label = currentElement.innerHTML.toString();

		if (title && title.match(new RegExp(text, 'i')) !== null || label.match(new RegExp(text, 'i')) !== null) {
			currentElement.style.display = 'block';
		} else {
			currentElement.style.display = 'none';
		}
	}
}

function initializeList() {
	var placeholderList = document.getElementById('placeholder-list');
	var elements = placeholderList.getElementsByTagName('a');

	for (var i = 0; i < elements.length; i++) {
		elements[i].className = '';
		elements[i].style.display = 'block';
	}
}

CKEDITOR.dialog.add( 'placeholder2', function( editor ) {
	var validNameRegex = /^[^\[\]]+$/;
	var placeholderList = editor.config.placeholder2.placeholders.map(function(placeholder) {
		return '<a href="javascript:void(0)" onclick="setPlaceholder(this); return false;" title="'+
			placeholder.value +'">' + placeholder.label + '</a>';
	});


	return {
		title: 'Placeholder Properties',
		minWidth: 600,
		minHeight: 400,
		contents: [
			{
				id: 'placeholderGroups',
				label: 'Groups',
				title: 'Groups',
				elements: [
					{
						type: 'text',
						id: 'placeholderSearch',
						className: 'placeholderSearch',
{'fraction_non_alphanumeric': 0.16653491436100132, 'fraction_numerical': 0.007378129117259552, 'mean_word_length': 4.7254901960784315, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 8, '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': '5412799', 'n_tokens_mistral': 1282, 'n_tokens_neox': 1140, 'n_words': 243}