<commit_before><% @fullscreen = true %>
<% content_for :scripts do %>
  <%= javascript_include_tag 'highlighter' %>
  <%= javascript_include_tag 'code/css' %>
  <%= javascript_include_tag 'code/javascript' %>
  <%= javascript_include_tag 'code/ruby' %>
  <%= javascript_include_tag 'code/html' %>
<% end %>

<% unless @message || current_changeset.nil? -%>
<div class="changeset clearfix" id="last-log">
  <div class="cs-meta">
    <%= avatar_for(current_changeset.user) %>
    <p>
      <span class="change-number"><%= link_to(current_changeset.revision, changeset_path(current_changeset.revision)) %></span>
    </p>
  </div>
  <div class="cs-log">      
     <%=h current_changeset.message %>
    <span class="timenauthor">by <%= current_changeset.author %>, <%= jstime current_changeset.changed_at %></span>
  </div>
  <ul class="changeset-nav">
    <%= %(<li class="prev"> #{link_to_node('back', @node, previous_changeset.revision)}</li>) if previous_changeset %>
    <%= %(<li class="next"> #{link_to_node('forward', @node, next_changeset.revision)}</li>) if @revision && next_changeset %>
  </ul>
</div>
<% end -%>
<div id="crumbs">
  <ul class="clearfix"><%= link_to_crumbs @node.path %></ul>
</div>
<% if @node.text? -%>
    <table class="diff sourcecode file-source" cellspacing="0" cellpadding="0">
      <thead>
        <tr class="controls">
          <td>
            <div class="control-head">
              <p class="controlblock">
                <%= link_to_node 'back', @node, previous_changeset.revision, :class => 'back' if previous_changeset %>
                <%= link_to_node 'forward', @node, next_changeset.revision, :class => 'forward' if @revision && next_changeset %>
              </p>
              <ul class="formats">
                <li><%= link_to_history 'History', @node %></li>
                <li<% unless @node.text? %> class="end"<% end %>><%= link_to 'Raw', raw_path(:paths => @node.paths) %></li>
                <% if @node.text? -%><li class="end"><%= link_to 'Text', text_path(:paths => @node.paths) %></li><% end -%>
              </ul>
            </div>
          </td>
        </tr>
        <tr>
          <th><%= @node.path.split('/').last %></th>
        </tr>
      </thead>
    </table>
    <pre class="viewsource"><code class="<%= highlight_as(@node.path.split('/').last) %>"><%=h @node.content %></code></pre>
    
<% elsif @node.image? -%>

<table class="diff sourcecode file-source" cellspacing="0" cellpadding="0">
  <thead>
    <tr class="controls">
      <td>
        <div class="control-head">
          <p class="controlblock">
            <%= link_to_node 'back', @node, previous_changeset.revision, :class => 'back' if previous_changeset %>
            <%= link_to_node 'forward', @node, next_changeset.revision, :class => 'forward' if @revision && next_changeset %>
          </p>
          <ul class="formats">
            <li><%= link_to_history 'History', @node %></li>
            <li class="end"><%= link_to 'Raw', raw_path(:paths => @node.paths) %></li>
          </ul>
        </div>
      </td>
    </tr>
    <tr>
      <th><%= @node.path.split('/').last %></th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td id="imagefile"><%= image_tag raw_path(:paths => @node.paths) %></td>
    </tr>
  </tbody>
</table>
<% else -%>
  <p>Download <%= link_to h(@node.path), raw_path(:paths => @node.paths) %>.</p>
<% end -%><commit_msg>show proper error message when trying to view nonexistent file<commit_after><% @fullscreen = true %>
<% content_for :scripts do %>
  <%= javascript_include_tag 'highlighter' %>
  <%= javascript_include_tag 'code/css' %>
  <%= javascript_include_tag 'code/javascript' %>
  <%= javascript_include_tag 'code/ruby' %>
  <%= javascript_include_tag 'code/html' %>
<% end %>

<% unless @message || current_changeset.nil? -%>
<div class="changeset clearfix" id="last-log">
  <div class="cs-meta">
    <%= avatar_for(current_changeset.user) %>
    <p>
      <span class="change-number"><%= link_to(current_changeset.revision, changeset_path(current_changeset.revision)) %></span>
    </p>
  </div>
  <div class="cs-log">      
     <%=h current_changeset.message %>
    <span class="timenauthor">by <%= current_changeset.author %>, <%= jstime current_changeset.changed_at %></span>
  </div>
  <ul class="changeset-nav">
    <%= %(<li class="prev"> #{link_to_node('back', @node, previous_changeset.revision)}</li>) if previous_changeset %>
    <%= %(<li class="next"> #{link_to_node('forward', @node, next_changeset.revision)}</li>) if @revision && next_changeset %>
  </ul>
</div>
<% end -%>
<div id="crumbs">
  <ul class="clearfix"><%= link_to_crumbs @node.path %></ul>
</div>
<% if @node.text? -%>
    <table class="diff sourcecode file-source" cellspacing="0" cellpadding="0">
      <thead>
        <tr class="controls">
          <td>
            <div class="control-head">
              <p class="controlblock">
                <%= link_to_node 'back', @node, previous_changeset.revision, :class => 'back' if previous_changeset %>
                <%= link_to_node 'forward', @node, next_changeset.revision, :class => 'forward' if @revision && next_changeset %>
              </p>
              <ul class="formats">
                <li><%= link_to_history 'History', @node %></li>
                <li<% unless @node.text? %> class="end"<% end %>><%= link_to 'Raw', raw_path(:paths => @node.paths) %></li>
                <% if @node.text? -%><li class="end"><%= link_to 'Text', text_path(:paths => @node.paths) %></li><% end -%>
              </ul>
            </div>
          </td>
        </tr>
        <tr>
          <th><%= @node.path.split('/').last %></th>
        </tr>
      </thead>
    </table>
    <pre class="viewsource"><code class="<%= highlight_as(@node.path.split('/').last) %>"><%=h @node.content %></code></pre>
    
<% elsif @node.image? -%>

<table class="diff sourcecode file-source" cellspacing="0" cellpadding="0">
  <thead>
    <tr class="controls">
      <td>
        <div class="control-head">
          <p class="controlblock">
            <%= link_to_node 'back', @node, previous_changeset.revision, :class => 'back' if previous_changeset %>
            <%= link_to_node 'forward', @node, next_changeset.revision, :class => 'forward' if @revision && next_changeset %>
          </p>
          <ul class="formats">
            <li><%= link_to_history 'History', @node %></li>
            <li class="end"><%= link_to 'Raw', raw_path(:paths => @node.paths) %></li>
          </ul>
        </div>
      </td>
    </tr>
    <tr>
      <th><%= @node.path.split('/').last %></th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td id="imagefile"><%= image_tag raw_path(:paths => @node.paths) %></td>
    </tr>
  </tbody>
</table>
<% elsif @node.exists? %>
  <p>Download <%= link_to h(@node.path), raw_path(:paths => @node.paths) %>.</p>
<% else -%>
  <p>This file does not exist.</p>
<% end -%>
{'fraction_non_alphanumeric': 0.21287988422575976, 'fraction_numerical': 0.0011577424023154848, 'mean_word_length': 2.9089366515837103, 'pattern_counts': {'":': 0, '<': 248, '<?xml version=': 0, '>': 266, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3286401', 'n_tokens_mistral': 2516, 'n_tokens_neox': 2345, 'n_words': 476}