<commit_before>﻿(function($, pubsub, elements) {
    var codeProcess = function(items) {
            $.each(items, function() {
                var item = $(this).addClass('prettyprint'),
                    codeType = item.hasClass('glimpse-code') ? item.attr('data-codeType') : item.closest('.glimpse-code').attr('data-codeType');

                item.html(prettyPrintOne(item.html(), codeType));
            });
        },
        apply = function(options) { 
            // Expand collapse  
            options.scope.find('.glimpse-expand').live('click', function() {
                var toggle = $(this).toggleClass('glimpse-collapse'),
                    hasClass = toggle.hasClass('glimpse-collapse');
                toggle.parent().next().children().first().toggle(!hasClass).next().toggle(hasClass);
            });
            
            // Alert state
            options.scope.find('.info, .warn, .error, .fail, .loading, .ms')
                .find('> td:first-child, > tr:first-child > td:first-child:not(:has(div.glimpse-cell)), > tr:first-child > td:first-child > div.glimpse-cell:first-child')
                .not(':has(.icon)').prepend('<div class="icon"></div>');

            // Code formatting
            codeProcess(options.scope.find('.glimpse-code:not(:has(table)), .glimpse-code > table:not(:has(thead)) .glimpse-preview-show'));

            // Open state
            options.scope.find('.glimpse-start-open > td > .glimpse-expand:first-child').click(); 
        };
     
    pubsub.subscribe('trigger.panel.render.style', apply);
})(jQueryGlimpse, glimpse.pubsub, glimpse.elements);<commit_msg>Fixed bug where expand wasn't working<commit_after>﻿(function($, pubsub, elements) {
    var codeProcess = function(items) {
            $.each(items, function() {
                var item = $(this).addClass('prettyprint'),
                    codeType = item.hasClass('glimpse-code') ? item.attr('data-codeType') : item.closest('.glimpse-code').attr('data-codeType');

                item.html(prettyPrintOne(item.html(), codeType));
            });
        },
        apply = function(options) { 
            // Expand collapse  
            options.scope.find('.glimpse-expand').click(function() {
                var toggle = $(this).toggleClass('glimpse-collapse'),
                    hasClass = toggle.hasClass('glimpse-collapse');
                toggle.parent().next().children().first().toggle(!hasClass).next().toggle(hasClass);
            });
            
            // Alert state
            options.scope.find('.info, .warn, .error, .fail, .loading, .ms')
                .find('> td:first-child, > tr:first-child > td:first-child:not(:has(div.glimpse-cell)), > tr:first-child > td:first-child > div.glimpse-cell:first-child')
                .not(':has(.icon)').prepend('<div class="icon"></div>');

            // Code formatting
            codeProcess(options.scope.find('.glimpse-code:not(:has(table)), .glimpse-code > table:not(:has(thead)) .glimpse-preview-show'));

            // Open state
            options.scope.find('.glimpse-start-open > td > .glimpse-expand:first-child').click(); 
        };
     
    pubsub.subscribe('trigger.panel.render.style', apply);
})(jQueryGlimpse, glimpse.pubsub, glimpse.elements);
{'fraction_non_alphanumeric': 0.17898594990836897, 'fraction_numerical': 0.0, 'mean_word_length': 2.2587064676616917, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 25, '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': '4043875', 'n_tokens_mistral': 942, 'n_tokens_neox': 950, 'n_words': 127}