<commit_before>Class("Editor", {

	Editor : function(id, name, type) {

		this.text = [];
		this.name = name;
		this.type = type;
		this.errors = [];
		this.tooltips = [];
		this.compiled = "";
		this.keyListener = new keypress.Listener();

		this.codeMirror = CodeMirror(document.getElementById(id), {
			lineNumbers: true,
			mode: type,
			styleActiveLine: true,
			matchBrackets: true,
			theme: "monokai"
		});

		this.setCodeListeners();

	},

	focus : function() {
		this.codeMirror.focus();
	},

	download : function() {
		var filename = $("#tab_" + app.currentTab + " span").text();
		var text = app.editors[app.currentTab].text.join("\n");
		var pom = document.createElement('a');
		pom.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text));
		pom.setAttribute('download', filename);
		pom.click();
	},

	compile : function() {
		this.saveText();
		$('#coffee_compiler i').removeClass().addClass("fa fa-circle-o-notch fa-spin");
		var compiled = CoffeeScript.compile(this.text.join("\n")).split("\n");
		this.compiled = compiled.slice(1, compiled.length-2).join("\n");
		$('#coffee_compiler i').css("color", "green");
		$('#coffee_compiler i').removeClass().addClass("fa fa-check");
		app._eval();<commit_msg>updated coffe_compiler button style<commit_after>Class("Editor", {

	Editor : function(id, name, type) {

		this.text = [];
		this.name = name;
		this.type = type;
		this.errors = [];
		this.tooltips = [];
		this.compiled = "";
		this.keyListener = new keypress.Listener();

		this.codeMirror = CodeMirror(document.getElementById(id), {
			lineNumbers: true,
			mode: type,
			styleActiveLine: true,
			matchBrackets: true,
			theme: "monokai"
		});

		this.setCodeListeners();

	},

	focus : function() {
		this.codeMirror.focus();
	},

	download : function() {
		var filename = $("#tab_" + app.currentTab + " span").text();
		var text = app.editors[app.currentTab].text.join("\n");
		var pom = document.createElement('a');
		pom.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text));
		pom.setAttribute('download', filename);
		pom.click();
	},

	compile : function() {
		this.saveText();
		$('#coffee_compiler i').removeClass().addClass("fa fa-circle-o-notch fa-spin");
		try {
			var compiled = CoffeeScript.compile(this.text.join("\n")).split("\n");
			this.compiled = compiled.slice(1, compiled.length-2).join("\n");
			app._eval();
			$('#coffee_compiler i').css("color", "green");
			$('#coffee_compiler i').removeClass().addClass("fa fa-check");
		} catch (e) {
			$('#coffee_compiler i').css("color", "red");
			$('#coffee_compiler i').removeClass().addClass("fa fa-remove");
		}
{'fraction_non_alphanumeric': 0.20232732732732733, 'fraction_numerical': 0.0022522522522522522, 'mean_word_length': 4.287698412698413, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2307677', 'n_tokens_mistral': 990, 'n_tokens_neox': 888, 'n_words': 153}