<commit_before>(function($) {
  $.fn.replaceTagName = function(replaceWith) {
    var tags = [],
    i    = this.length;
    while (i--) {
      var newElement = document.createElement(replaceWith),
      thisi      = this[i],
      thisia     = thisi.attributes;
      for (var a = thisia.length - 1; a >= 0; a--) {
        var attrib = thisia[a];
        newElement.setAttribute(attrib.name, attrib.value);
      };
      newElement.innerHTML = thisi.innerHTML;
      $(thisi).after(newElement).remove();
      tags[i - 1] = newElement;
    }
    return $(tags);
  };
})(window.jQuery);




$(function() {
  var highlights = $('code').attr('lines');
  $('code').addClass('prettyprint linenums'); 
  $('code').replaceTagName('pre');     

  prettyPrint();
  $('pre li:eq(0)').remove();

  
  if(highlights) {
    highlights = highlights.replace(/\s/g, "").split(','); 


    for (var i = highlights.length - 1; i >= 0; i--) {
      if(highlights[i].indexOf('-')) { // a range like 3-5
        var range = highlights[i].split('-');

        $('pre li:nth-child(n+' + range[0] + '):nth-child(-n+' + range[1] + ')' ).attr('style', 'background-color:#555;'); 
        
      } else { // just a number
        $('pre li:nth-child(' + highlights[i] + ')').attr('style', 'background-color:#555;');    ///////////////// color   
      }
      
    }
  }

});<commit_msg>support highlight for a range of line<commit_after>(function($) {
  $.fn.replaceTagName = function(replaceWith) {
    var tags = [],
    i    = this.length;
    while (i--) {
      var newElement = document.createElement(replaceWith),
      thisi      = this[i],
      thisia     = thisi.attributes;
      for (var a = thisia.length - 1; a >= 0; a--) {
        var attrib = thisia[a];
        newElement.setAttribute(attrib.name, attrib.value);
      };
      newElement.innerHTML = thisi.innerHTML;
      $(thisi).after(newElement).remove();
      tags[i - 1] = newElement;
    }
    return $(tags);
  };
})(window.jQuery);




$(function() {
  var highlights = $('code').attr('lines');
  $('code').addClass('prettyprint linenums'); 
  $('code').replaceTagName('pre');     

  prettyPrint();
  $('pre li:eq(0)').remove();

  
  if(highlights) {
    highlights = highlights.replace(/\s/g, "").split(','); 


    for (var i = highlights.length - 1; i >= 0; i--) {
      if(highlights[i].indexOf('-') != -1) { // a range like 3-5
        var range = highlights[i].split('-');
        console.log('range',range);

        $('pre li:nth-child(n+' + range[0] + '):nth-child(-n+' + range[1] + ')' ).attr('style', 'background-color:#555;'); 
        
      } else { // just a number
        $('pre li:nth-child(' + highlights[i] + ')').attr('style', 'background-color:#555;');    ///////////////// color   
      }
      
    }
  }

});
{'fraction_non_alphanumeric': 0.21991404011461319, 'fraction_numerical': 0.01181948424068768, 'mean_word_length': 2.3329355608591884, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '7185465', 'n_tokens_mistral': 969, 'n_tokens_neox': 930, 'n_words': 178}