<commit_before><h5>
  <a name="comments">Comments</a>
</h5>
<p><a href="#comment-form">Leave a response</a></p>
<ol class="comments" id="comments">
<!-- Put this in a partial. Actually I think we should reopen the article model, and stick in has_many :comments. do that. -->
<% Comment.all_for_post(@article.id).each do |comment| %>
  <li id="comment-<%= comment.id %>" class="comment">
    <div class="author">
      <cite><span class="author"><span><%= comment.website.blank? ? h(comment.name) : link_to(h(comment.name), comment.website) %></span></span></cite> – 
      <abbr title="<%= comment.created_at %>"><span class="date"><%= TZInfo::Timezone.get(@article.user.time_zone).utc_to_local(comment.created_at).strftime("%b %d %y @ %I:%M%p") %></span></abbr>
    </div>
    <div class="content">
      <%= render_text(comment.formatter, h(comment.comment)) %>
    </div>
  </li>  
<% end %>
</ol>
<div>
  <% form_for :comment, :action => url(:comment), :id => 'comment-form' do %>
    <% if session[:comment_error] %>
      <ul id="comment-errors">
      	<% session[:comment_error].each do |err| %>
          <li><%= err %></li>
      	<% end %>
      </ul>
    	<% session[:comment_error] = nil %>
    <% end %>
    <fieldset>
      <legend>Comment</legend>
      <%= hidden_field :name => "comment[article_id]", :value => @article.id %>
	  <% if CommentSetting.current.negative_captcha %>
	  	<%= text_field :name => "comment[notes]", :id => "comment_notes" %>
	  	<script type="text/javascript">
			document.getElementById('comment_notes').style.display = "none";
	  	</script>
	  <% end %>
      <p>
        <label for="comment_name" class="text">Name:</label>
        <%= text_field :name => 'comment[name]', :size => 30, :id => 'comment_name' %>
      </p>
      <p>
        <label for="comment_email_address" class="text">Email Address:</label>
        <%= text_field :name => 'comment[email_address]', :size => 30, :id => 'comment_email_address' %>
      </p>
      <p>
      	<label class="text" for="comment_website">Website:</label>
        <%= text_field :name => 'comment[website]', :size => 30, :id => 'comment_website' %>
      </p>
	  <p>
	    <label class="text" for="comment_formatter">Formatter:</label>
	    <%= select :name => 'comment[formatter]', :collection => Hooks::Formatters.available_formatters.collect { |i| [i, i] }, :selected => 'default', :id => 'comment_formatter' %>
	  </p>
      <p>
      	<label class="text" for="comment_comment">Comment:</label>
      	<%= text_area_field "", :name => 'comment[comment]', :rows => 10, :cols => 30, :id => 'comment_comment' %>
      </p>
      <div class="formactions">
      	<%= submit_button "Post comment", :class => 'submit' %>
      </div>
    </fieldset>
  <% end %>
</div><commit_msg>Fixing comments plugin for the helpers refactor<commit_after><h5>
  <a name="comments">Comments</a>
</h5>
<p><a href="#comment-form">Leave a response</a></p>
<ol class="comments" id="comments">
<!-- Put this in a partial. Actually I think we should reopen the article model, and stick in has_many :comments. do that. -->
<% Comment.all_for_post(@article.id).each do |comment| %>
  <li id="comment-<%= comment.id %>" class="comment">
    <div class="author">
      <cite><span class="author"><span><%= comment.website.blank? ? h(comment.name) : link_to(h(comment.name), comment.website) %></span></span></cite> – 
      <abbr title="<%= comment.created_at %>"><span class="date"><%= TZInfo::Timezone.get(@article.user.time_zone).utc_to_local(comment.created_at).strftime("%b %d %y @ %I:%M%p") %></span></abbr>
    </div>
    <div class="content">
      <%= render_text(comment.formatter, h(comment.comment)) %>
    </div>
  </li>  
<% end %>
</ol>
<div>
  <%= form_for :comment, :action => url(:comment), :id => 'comment-form' do %>
    <% if session[:comment_error] %>
      <ul id="comment-errors">
      	<% session[:comment_error].each do |err| %>
          <li><%= err %></li>
      	<% end %>
      </ul>
    	<% session[:comment_error] = nil %>
    <% end %>
    <fieldset>
      <legend>Comment</legend>
      <%= hidden_field :name => "comment[article_id]", :value => @article.id %>
	  <% if CommentSetting.current.negative_captcha %>
	  	<%= text_field :name => "comment[notes]", :id => "comment_notes" %>
	  	<script type="text/javascript">
			document.getElementById('comment_notes').style.display = "none";
	  	</script>
	  <% end %>
      <p>
        <label for="comment_name" class="text">Name:</label>
        <%= text_field :name => 'comment[name]', :size => 30, :id => 'comment_name' %>
      </p>
      <p>
        <label for="comment_email_address" class="text">Email Address:</label>
        <%= text_field :name => 'comment[email_address]', :size => 30, :id => 'comment_email_address' %>
      </p>
      <p>
      	<label class="text" for="comment_website">Website:</label>
        <%= text_field :name => 'comment[website]', :size => 30, :id => 'comment_website' %>
      </p>
	  <p>
	    <label class="text" for="comment_formatter">Formatter:</label>
	    <%= select :name => 'comment[formatter]', :collection => Hooks::Formatters.available_formatters, :selected => 'default', :id => 'comment_formatter' %>
	  </p>
      <p>
      	<label class="text" for="comment_comment">Comment:</label>
      	<%= text_area "", :name => 'comment[comment]', :rows => 10, :cols => 30, :id => 'comment_comment' %>
      </p>
      <div class="formactions">
      	<%= submit "Post comment", :class => 'submit' %>
      </div>
    </fieldset>
  <% end =%>
</div>
{'fraction_non_alphanumeric': 0.21660649819494585, 'fraction_numerical': 0.004332129963898917, 'mean_word_length': 3.5085435313262816, 'pattern_counts': {'":': 0, '<': 175, '<?xml version=': 0, '>': 223, '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': '932579', 'n_tokens_mistral': 1998, 'n_tokens_neox': 1830, 'n_words': 382}