<commit_before>var Handlebars = require('handlebars/runtime')['default'];
var _ = require('underscore');
var Factory = require('./factory');

Handlebars.registerHelper('input', function(attrs) {
	attrs.hash.type = attrs.hash.type || 'text';

	if(attrs.hash.type === 'radio' || attrs.hash.type === 'checkbox') {
		var msg = 'Não há suporte a este tipo de input. Use {{radio}} ou {{checkbox}}!';
		console.error(msg);
		return new Handlebars.SafeString('<span class="text-danger">'+msg+'</span>');
	}

	if(!_.isEmpty(attrs.data.root) && attrs.hash.name && !attrs.hash.value) {
		var value = attrs.data.root[attrs.hash.name];

		if(value !== undefined) {
			attrs.hash.value = value;
		}
	}

	return new Handlebars.SafeString(Factory($('<input/>'), attrs));
});<commit_msg>english error message<commit_after>var Handlebars = require('handlebars/runtime')['default'];
var _ = require('underscore');
var Factory = require('./factory');

Handlebars.registerHelper('input', function(attrs) {
	attrs.hash.type = attrs.hash.type || 'text';

	if(attrs.hash.type === 'radio' || attrs.hash.type === 'checkbox') {
		var msg = 'For radio and checkbox input types use {{radio}} or {{checkbox}}!';
		console.error(msg);
		return new Handlebars.SafeString('<span class="text-danger">'+msg+'</span>');
	}

	if(!_.isEmpty(attrs.data.root) && attrs.hash.name && !attrs.hash.value) {
		var value = attrs.data.root[attrs.hash.name];

		if(value !== undefined) {
			attrs.hash.value = value;
		}
	}

	return new Handlebars.SafeString(Factory($('<input/>'), attrs));
});
{'fraction_non_alphanumeric': 0.20504527813712808, 'fraction_numerical': 0.0, 'mean_word_length': 4.95, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '4850206', 'n_tokens_mistral': 522, 'n_tokens_neox': 505, 'n_words': 100}