<commit_before>/* ==========================================================================
   comment-docs-test
   ========================================================================== */

var html = $();
var families = {};
$.getJSON("/static/css/main.json", function(json) {
  var data = json;
  $.each(json, function(index, item){
    if ( item.docs.family !== undefined ) {
      if ( families[item.docs.family] === undefined ) {
        families[item.docs.family] = [];
        var $button = $('<button class="nav_btn"></button>');
        $button.text(item.docs.family);
        $button.data('family-key', item.docs.family);
        $button.data('index', index);
        $button.on('focus', function(){
        console.log('poop');
        var key = $(this).data('family-key');
        var index = $(this).data('index');
        $('#body').empty();
        $.each(families[key], function(index, item){
          var componentName = item.docs.name;
          var $code = $('' +
            '<div class="container-code">' +
              '<pre class="component_code">' +
                '<code class="language-css">'+
                  $('<div>').text(item.code).html() +
                '</code>' +
                '</pre>' +
              '</div>'
          );
          var $markup = $('<div class="container-patterns"></div>');
          $.each(item.docs.patterns, function(index, item){
            if ( item.markup !== undefined ) {
              var $component = $('<div class="component"></div>');
              $component.append('<h1 class="component_name">'+componentName+': '+item.name+'</h1>');
              $component.append('<div class="component_rendered">'+item.markup+'</div>');
              $component.append('<pre class="component_markup"><code id="pattern-markup" class="language-markup">'+$('<div>').text(item.markup).html()+'</code></pre>');
              $markup.append( $component );
            }
          });
          $('#body').append( $markup );
          $('#body').append( $code );
          // console.log(item);
          Prism.highlightAll();
        });
        console.log('=============');
      });
      html = html.add($('<li class="nav_item">').append($button));
      families[item.docs.family].push(item);
    } else {
      families[item.docs.family].push(item);
    }
  }
  });
  $('#nav').append(html);
  $('#nav').find('.nav_btn').first().trigger('focus');
});<commit_msg>Clears consoles.<commit_after>/* ==========================================================================
   comment-docs-test
   ========================================================================== */

var html = $();
var families = {};
$.getJSON("/static/css/main.json", function(json) {
  var data = json;
  $.each(json, function(index, item){
    if ( item.docs.family !== undefined ) {
      if ( families[item.docs.family] === undefined ) {
        families[item.docs.family] = [];
        var $button = $('<button class="nav_btn"></button>');
        $button.text(item.docs.family);
        $button.data('family-key', item.docs.family);
        $button.data('index', index);
        $button.on('focus', function(){
        var key = $(this).data('family-key');
        var index = $(this).data('index');
        $('#body').empty();
        $.each(families[key], function(index, item){
          var componentName = item.docs.name;
          var $code = $('' +
            '<div class="container-code">' +
              '<pre class="component_code">' +
                '<code class="language-css">'+
                  $('<div>').text(item.code).html() +
                '</code>' +
                '</pre>' +
              '</div>'
          );
          var $markup = $('<div class="container-patterns"></div>');
          $.each(item.docs.patterns, function(index, item){
            if ( item.markup !== undefined ) {
              var $component = $('<div class="component"></div>');
              $component.append('<h1 class="component_name">'+componentName+': '+item.name+'</h1>');
              $component.append('<div class="component_rendered">'+item.markup+'</div>');
              $component.append('<pre class="component_markup"><code id="pattern-markup" class="language-markup">'+$('<div>').text(item.markup).html()+'</code></pre>');
              $markup.append( $component );
            }
          });
          $('#body').append( $markup );
          $('#body').append( $code );
          Prism.highlightAll();
        });
      });
      html = html.add($('<li class="nav_item">').append($button));
      families[item.docs.family].push(item);
    } else {
      families[item.docs.family].push(item);
    }
  }
  });
  $('#nav').append(html);
  $('#nav').find('.nav_btn').first().trigger('focus');
});
{'fraction_non_alphanumeric': 0.27390939597315433, 'fraction_numerical': 0.0008389261744966443, 'mean_word_length': 2.4912152269399708, 'pattern_counts': {'":': 0, '<': 49, '<?xml version=': 0, '>': 49, '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': '4071705', 'n_tokens_mistral': 1350, 'n_tokens_neox': 1334, 'n_words': 194}