<commit_before><!DOCTYPE html>
<html lang="en" class="<%= compose_html_classes(@html_classes) %> dc-design-transition">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  <title><%= compose_title(@title) %></title>
  <% stylesheets_header = [File.join(DC.workspace_asset_root, "/css/platform.css")] + (@stylesheets_header || []) %>
  <%= stylesheet_link_tag *stylesheets_header %>
  <% javascripts_header = (@javascripts_header || []) %>
  <%= javascript_include_tag *javascripts_header %>
  <%= csrf_meta_tags %>
</head>
<body>
  <%= render 'common/new/header' %>

  <main>
    <%= yield %>
  </main>

  <%= render 'common/new/footer' %>

  <%# TODO: stop the `@exclude_platformjs` by fixing platform.js and dc-pages %>
  <% javascripts_footer = @exclude_platformjs ? [] : [File.join(DC.workspace_asset_root, "/js/platform.js")] %>
  <% javascripts_footer += (@javascripts_footer || []) %>
  <%= javascript_include_tag *javascripts_footer %>

  <% if @javascript_footer_inline %>
  <script>
  $(document).ready(function() {
    <%= raw @javascript_footer_inline %>
  });
  </script>
  <% end %>
</body>
</html><commit_msg>Only call `$(document).ready` if `$` exists<commit_after><!DOCTYPE html>
<html lang="en" class="<%= compose_html_classes(@html_classes) %> dc-design-transition">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  <title><%= compose_title(@title) %></title>
  <% stylesheets_header = [File.join(DC.workspace_asset_root, "/css/platform.css")] + (@stylesheets_header || []) %>
  <%= stylesheet_link_tag *stylesheets_header %>
  <% javascripts_header = (@javascripts_header || []) %>
  <%= javascript_include_tag *javascripts_header %>
  <%= csrf_meta_tags %>
</head>
<body>
  <%= render 'common/new/header' %>

  <main>
    <%= yield %>
  </main>

  <%= render 'common/new/footer' %>

  <%# TODO: stop the `@exclude_platformjs` by fixing platform.js and dc-pages %>
  <% javascripts_footer = @exclude_platformjs ? [] : [File.join(DC.workspace_asset_root, "/js/platform.js")] %>
  <% javascripts_footer += (@javascripts_footer || []) %>
  <%= javascript_include_tag *javascripts_footer %>

  <% if @javascript_footer_inline %>
  <script>
    var $ = window.$ || (window.DocumentCloud && window.DocumentCloud.$) || (window.Backbone && window.Backbone.$);
    if ($ !== void 0) {
      $(document).ready(function() {
        <%= raw @javascript_footer_inline %>
      });
    }
  </script>
  <% end %>
</body>
</html>
{'fraction_non_alphanumeric': 0.20148698884758365, 'fraction_numerical': 0.0018587360594795538, 'mean_word_length': 4.762312633832977, 'pattern_counts': {'":': 0, '<': 69, '<?xml version=': 0, '>': 69, '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': '1659764', 'n_tokens_mistral': 1020, 'n_tokens_neox': 904, 'n_words': 148}