<commit_before><h2><%= domain.host %></h2>

<div class="row">
  <div class="col-md-6">
    <h3>Domain</h3>
    <table class="table table-striped">
      <% domain.to_h.reject { |k,v| v.is_a?(Hash) }.each do |key, value| %>
        <%= format_key_value(key, value) %>
      <% end %>
    </table>
  </div>

  <div class="col-md-6">
    <h3>Canonical Endpoint</h3>
    <table class="table table-striped">
      <table class="table table-striped">
        <% endpoint.to_h.reject { |k,v| v.is_a?(Hash) }.each do |key, value| %>
          <%= format_key_value(key, value) %>
        <% end %>
      </table>
    </table>
  </div>
</div>

<div class="row">
    <% SiteInspector::Endpoint.checks.each_with_index do |check, index| %>
    <div class="col-md-6">
      <h3><%= format_key(check.name) %></h3>
      <table class="table table-striped">
        <% endpoint.send(check.name).to_h.each do |key,value| %>
          <%= format_key_value(key, value) %>
        <% end %>
      </table>
      <% if (index + 1) % 2 == 0 %>
        </div>
        <div class="row">
      <% end %>
    </div>
    <% end %>
</div>

<div class="have_another">
  <a href="/">Check another domain?</a>
</div>
<commit_msg>guard against check result being nil<commit_after><h2><%= domain.host %></h2>

<div class="row">
  <div class="col-md-6">
    <h3>Domain</h3>
    <table class="table table-striped">
      <% domain.to_h.reject { |k,v| v.is_a?(Hash) }.each do |key, value| %>
        <%= format_key_value(key, value) %>
      <% end %>
    </table>
  </div>

  <div class="col-md-6">
    <h3>Canonical Endpoint</h3>
    <table class="table table-striped">
      <table class="table table-striped">
        <% endpoint.to_h.reject { |k,v| v.is_a?(Hash) }.each do |key, value| %>
          <%= format_key_value(key, value) %>
        <% end %>
      </table>
    </table>
  </div>
</div>

<div class="row">
    <% SiteInspector::Endpoint.checks.each_with_index do |check, index| %>
    <div class="col-md-6">
      <h3><%= format_key(check.name) %></h3>
      <table class="table table-striped">
        <% result = endpoint.send(check.name) %>
        <% if result %> 
          <% result.to_h.each do |key,value| %>
           <%= format_key_value(key, value) %>
          <% end %>
        <% end %>
      </table>
      <% if (index + 1) % 2 == 0 %>
        </div>
        <div class="row">
      <% end %>
    </div>
    <% end %>
</div>

<div class="have_another">
  <a href="/">Check another domain?</a>
</div>

{'fraction_non_alphanumeric': 0.21442885771543085, 'fraction_numerical': 0.011222444889779559, 'mean_word_length': 2.3821138211382116, 'pattern_counts': {'":': 0, '<': 100, '<?xml version=': 0, '>': 100, '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': '5584546', 'n_tokens_mistral': 996, 'n_tokens_neox': 924, 'n_words': 184}