<commit_before>/**
 * This module generates a table of contents from the <h2>s on a page.
 */

!function() {

var $h2s = $('.docs-component h2');
var $toc = $('[data-docs-toc]');

$h2s.each(function() {
  // Ignore <h2>s inside of a rendered code sample
  if ($(this).parents('.docs-code-live').length) return;

  var text = $(this).text();
  var anchor = $(this).children('a').attr('href');

  $toc.append('<li><a href="'+anchor+'">'+text+'</a></li>');
});

// Initialize Magellan on the generated table of contents
if ($toc.length) {
  if (typeof Foundation !== 'undefined') {
    new Foundation.Magellan($toc, {});
  }
}

}();

//var $window = $(window);
//var $container = $('.docs-component');
//var $TOC = $('#docsToc');
//var $TOCparent = $TOC.parent();
//
//if($TOC.is('*')) {
//  var fixedTop = $container.offset().top;
//  var innerHeight = 0;
//  $container.children().each(function() {innerHeight += $(this).height()});
//  var containerHeight = $container.height();<commit_msg>Add offset in magellan for TOC<commit_after>/**
 * This module generates a table of contents from the <h2>s on a page.
 */

!function() {

var $h2s = $('.docs-component h2');
var $toc = $('[data-docs-toc]');

$h2s.each(function() {
  // Ignore <h2>s inside of a rendered code sample
  if ($(this).parents('.docs-code-live').length) return;

  var text = $(this).text();
  var anchor = $(this).children('a').attr('href');

  $toc.append('<li><a href="'+anchor+'">'+text+'</a></li>');
});

// Initialize Magellan on the generated table of contents
if ($toc.length) {
  if (typeof Foundation !== 'undefined') {
    new Foundation.Magellan($toc, {barOffset: 80, deepLinking: true});
  }
}

}();

//var $window = $(window);
//var $container = $('.docs-component');
//var $TOC = $('#docsToc');
//var $TOCparent = $TOC.parent();
//
//if($TOC.is('*')) {
//  var fixedTop = $container.offset().top;
//  var innerHeight = 0;
//  $container.children().each(function() {innerHeight += $(this).height()});
//  var containerHeight = $container.height();
{'fraction_non_alphanumeric': 0.2410054213898472, 'fraction_numerical': 0.006899950714637753, 'mean_word_length': 3.9391727493917275, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '4522767', 'n_tokens_mistral': 714, 'n_tokens_neox': 694, 'n_words': 174}