<commit_before>//////////////////////////////
// Find width, in percentages, of the column span
//////////////////////////////
@function column-span($span, $location, $columns: false, $gutter: false) {

  // Find the columns and gutters
  $columns: find-grid($columns);
  $gutter: find-gutter($gutter);

  // Combine the columns and gutters
  $columns-and-gutters: column-sum($columns, $gutter);

  // Equal width columns are easy! Deal with them!
  @if type-of($columns) == 'number' or length($columns) == 1 {
    $span-and-gutters: $span + (($span - 1) * nth($gutter, 1));
    @return $span-and-gutters / $columns-and-gutters * 100%;
  }
  // Asymmetric lists are harder, so we're going to treat them as their own columns
  @else if type-of($columns) == 'list' or length($columns) > 1 {
    // Build a fake column set
    $sum: 0;
    $holder: ();

    @for $i from $location to ($location + $span) {
      $holder: append($holder, nth(nth($columns, $i), 1), comma);
    }

    // Get sub-column sum
    $span-and-gutters: column-sum($holder, $gutter);
    @return $span-and-gutters / $columns-and-gutters * 100%;
  }
  @else {
    @warn "Can't find a working set of columns! That's terrible!";
    @return false;
  }
}

//////////////////////////////
// Find the total sum of the columns<commit_msg>Rewritten for great justice (and to make it work)<commit_after>//////////////////////////////
// Find width, in percentages, of the column span
//////////////////////////////
@function column-span($span, $location, $columns: false, $gutter: false) {

  // Find the columns and gutters
  $columns: find-grid($columns);
  $gutter: find-gutter($gutter);

  // @debug $columns;
  // @debug $gutter;

  // Combine the columns and gutters
  $columns-and-gutters: column-sum($columns, $gutter);

  // @debug $columns-and-gutters;

  // Equal width columns are easy! Deal with them!
  @if type-of($columns) == 'number' or length($columns) == 1 {
    $span-and-gutters: $span + $gutter * ($span - 1);
    @return $span-and-gutters / $columns-and-gutters * 100%;
  }
  // Asymmetric lists are harder, so we're going to treat them as their own columns
  @else if type-of($columns) == 'list' or length($columns) > 1 {
    $span-and-gutters: 0;

    @if $location == 1 and $span >= 1 {
      @for $i from 1 through $span {
        $span-and-gutters: $span-and-gutters + nth($columns, $i) + $gutter;
      }
    }
    @else {
      $total: $location + $span - 1;
      @for $i from $location through $total {
        $span-and-gutters: $span-and-gutters + nth($columns, $i) + $gutter;
      }
    }
    $span-and-gutters: $span-and-gutters - $gutter;

    @return $span-and-gutters / $columns-and-gutters * 100%;
  }
  @else {
    @warn "Can't find a working set of columns! That's terrible!";
    @return false;
  }
}

//////////////////////////////
// Find the total sum of the columns
{'fraction_non_alphanumeric': 0.2125217391304348, 'fraction_numerical': 0.009043478260869564, 'mean_word_length': 2.3637426900584795, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '2357745', 'n_tokens_mistral': 994, 'n_tokens_neox': 916, 'n_words': 281}