<commit_before>/* jshint quotmark: single */
/* jshint evil: true */
/* jshint multistr: true */

(function () {
    'use strict';

    String.prototype.format = function() {
        var args = arguments;
        return this.replace(/{(\d+)}/g, function(match, number) { 
            return typeof args[number] != 'undefined' ? args[number] : match;
        });
    };

    var editor, settings, title, loading, layout, sourceMap,
        currentRow, currentSection, currentPassage;

    var run = function () {
        $('#output-container').html('');
        $('#debugger').html('');
        $('#restart').hide();
        $('a[href="#tab-output"]').tab('show');
        settings.compile({
            data: editor.getValue(),
            success: function (data) {
                $('#restart').show();

                $('<div/>', { id: 'output' })
                .appendTo('#output-container');

                $('<hr/>').appendTo('#output-container');

                if (data.indexOf('Failed') === 0) {
                    $('#output').html(data);
                    return;
                }

                try {
                    eval(data);
                }
                catch (e) {
                    $('#output').html(e);
                    return;
                }
                
                $('#output').squiffy({
                    scroll: 'element',
                    persist: false,
                    restartPrompt: false,
                    onSet: function (attribute, value) {
                        onSet(attribute, value);
                    }
                });
            },
            fail: function (data) {
                $('#output').html(data.message);<commit_msg>Create output div for failure message<commit_after>/* jshint quotmark: single */
/* jshint evil: true */
/* jshint multistr: true */

(function () {
    'use strict';

    String.prototype.format = function() {
        var args = arguments;
        return this.replace(/{(\d+)}/g, function(match, number) { 
            return typeof args[number] != 'undefined' ? args[number] : match;
        });
    };

    var editor, settings, title, loading, layout, sourceMap,
        currentRow, currentSection, currentPassage;

    var run = function () {
        $('#output-container').html('');
        $('#debugger').html('');
        $('#restart').hide();
        $('a[href="#tab-output"]').tab('show');
        settings.compile({
            data: editor.getValue(),
            success: function (data) {
                $('#restart').show();

                $('<div/>', { id: 'output' }).appendTo('#output-container');

                $('<hr/>').appendTo('#output-container');

                if (data.indexOf('Failed') === 0) {
                    $('#output').html(data);
                    return;
                }

                try {
                    eval(data);
                }
                catch (e) {
                    $('#output').html(e);
                    return;
                }
                
                $('#output').squiffy({
                    scroll: 'element',
                    persist: false,
                    restartPrompt: false,
                    onSet: function (attribute, value) {
                        onSet(attribute, value);
                    }
                });
            },
            fail: function (data) {
                $('<div/>', { id: 'output' }).appendTo('#output-container');
                $('#output').html(data.message);
{'fraction_non_alphanumeric': 0.16477916194790487, 'fraction_numerical': 0.0005662514156285391, 'mean_word_length': 1.301628664495114, 'pattern_counts': {'":': 0, '<': 8, '<?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': '1630971', 'n_tokens_mistral': 916, 'n_tokens_neox': 865, 'n_words': 178}