<commit_before>var editor = null;
var lastTextContent = "";

window.onkeydown = function(e) {
    if ((e.metaKey || e.ctrlKey) && (e.keyCode == 38 || e.keyCode == 40)) {
        e.preventDefault();
    }
};

function init() {
    markClean();
    var parent = document.getElementById('paren-soup');
    editor = paren_soup.core.init(parent, {
        "change-callback": function(e) {
            if (window.java) {
                if (e.type == "keyup") {
                    window.java.onautosave();
                }
                window.java.onchange();
            }
        },
        "disable-undo-redo?": true
    });
    document.getElementById('content').focus();
}

function initConsole(isRepl) {
    var parent = document.getElementById('paren-soup');
    editor = paren_soup.core.init(parent, {
        "change-callback": function(e) {
            if (window.java) {
                window.java.onchange();
            }
            if (e.type == "keyup") {
            	parent.scrollTop = parent.scrollHeight;
    		}
        },
        "disable-undo-redo?": true,
        "console-callback": function(text) {
            window.java.onenter(text + "\n");
        },
        "disable-clj?": !isRepl
    });
}

function undo() {
    paren_soup.core.undo(editor);
    if (window.java) {
        window.java.onautosave();
    }
}

function redo() {
    paren_soup.core.redo(editor);
    if (window.java) {
        window.java.onautosave();
    }
}

function canUndo() {
    if (editor == null) {
        return false;
    }
    return paren_soup.core.can_undo(editor);<commit_msg>Make console wrap<commit_after>var editor = null;
var lastTextContent = "";

window.onkeydown = function(e) {
    if ((e.metaKey || e.ctrlKey) && (e.keyCode == 38 || e.keyCode == 40)) {
        e.preventDefault();
    }
};

function init() {
    markClean();
    var parent = document.getElementById('paren-soup');
    editor = paren_soup.core.init(parent, {
        "change-callback": function(e) {
            if (window.java) {
                if (e.type == "keyup") {
                    window.java.onautosave();
                }
                window.java.onchange();
            }
        },
        "disable-undo-redo?": true
    });
    var content = document.getElementById('content');
    content.style.whiteSpace = "pre";
    content.focus();
}

function initConsole(isRepl) {
    var parent = document.getElementById('paren-soup');
    editor = paren_soup.core.init(parent, {
        "change-callback": function(e) {
            if (window.java) {
                window.java.onchange();
            }
            if (e.type == "keyup") {
            	parent.scrollTop = parent.scrollHeight;
    		}
        },
        "disable-undo-redo?": true,
        "console-callback": function(text) {
            window.java.onenter(text + "\n");
        },
        "disable-clj?": !isRepl
    });
    var content = document.getElementById('content');
    content.style.whiteSpace = "pre-wrap";
}

function undo() {
    paren_soup.core.undo(editor);
    if (window.java) {
        window.java.onautosave();
    }
}

function redo() {
    paren_soup.core.redo(editor);
    if (window.java) {
        window.java.onautosave();
    }
}

function canUndo() {
    if (editor == null) {
        return false;
    }
    return paren_soup.core.can_undo(editor);
{'fraction_non_alphanumeric': 0.15632458233890215, 'fraction_numerical': 0.002386634844868735, 'mean_word_length': 1.9593998234774934, 'pattern_counts': {'":': 12, '<': 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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2480292', 'n_tokens_mistral': 1087, 'n_tokens_neox': 1066, 'n_words': 173}