<commit_before><script>
  Helpy.yesHelped = '<%= j t(:yes_helped) %>';
  Helpy.noHelped = '<%= j t(:no_helped) %>';
  Helpy.contactUs = '<a href="<%= new_topic_path(doc_id: @doc.id) %>" class="btn btn-primary btn-lg get-help-button"><%= j t(:start_discussion) %></a>';
</script>

<div class="row content-row">
  <div class="col-md-3 hidden-xs hidden-sm">
    <div id="written-by" class="doc-meta">
      <div class="more-important meta-header"><%= I18n.t("written_by", default: "Written By") %>:</div>
      <div class="less-important">
        <%= avatar_image(@doc.user, size=40) %>
        <%= @doc.user.name.titleize %>
      </div>
    </div>
    <div id="doc-last-edit" class="doc-meta">
      <div class="more-important meta-header"><%= I18n.t("last_edited", default: "Last Edited") %>:</div>
      <div class="less-important"><%= last_active_time(@doc.updated_at) %></div>
    </div>
  </div>
  <div class="col-md-9">
    <p class="less-important"><%= @doc.content.html_safe %></p>
  </div>
</div>

<% if @doc.allow_comments %>
  <div class="row">
    <div class="col-md-3 hidden-xs hidden-sm"></div>
    <div class="col-md-9">
      <hr/>
      <h4><%= @posts.nil? ? "" : t(:topic) %></h4>
    </div>

    <div class="col-md-3 hidden-xs hidden-sm"></div>
  	<div class="col-md-9">
  		<script>
  			Helpy.messages = '<%= j t(:collapsed_messages, count: @posts.count-2) unless @posts.nil? %>';
  		</script>

  		<table id="posts">
  			<%= render :partial => 'comment', :collection => @posts %>
  		</table>

  		<% if user_signed_in? # show a form to reply or start discussion %>
        <div class="add-form">
    			<h4><%= @posts.nil? ? t(:start_discussion) : t(:reply) %></h4>
          <% if @topic %>
      			<%= bootstrap_form_for :post, :url => topic_posts_path(@topic) do |f| -%>
      			  <%= f.text_area :body, rows: 8, cols: 160, skip_label: true %></p>
      			  <%= f.hidden_field 'kind', value: 'reply' %>
      				<div class="add-screenshots">
      				  <%= attachinary_file_field_tag 'post[screenshots]', @post, :screenshots unless Cloudinary.config.cloud_name.nil? %>
      				</div>
      				<%= hidden_field_tag :client_id %>
      				<%= f.submit t(:submit_reply), class: 'btn btn-warning' -%>
      			<% end -%>

          <% else %>
            <%= bootstrap_form_for(Topic.new) do |f| -%>
              <%= text_area :post, :body, :rows => 8, :cols => 160, label: 'Message' -%>
              <div class="add-screenshots">
                <%= attachinary_file_field_tag 'topic[screenshots]', @topic, :screenshots unless Cloudinary.config.cloud_name.nil? %>
              </div>
              <%= hidden_field_tag :client_id %>
              <%= f.hidden_field :name, value: "Discussion on #{@doc.title}" %>
              <%= f.hidden_field :doc_id, value: @doc.id %>
              <%= f.hidden_field :private, value: false %>
              <%= f.hidden_field :forum_id, value: @forum.id %>
              <%= f.submit t(:submit_start_discussion, default: 'Start Discussion'), class: 'btn btn-warning' %>
            <% end -%>
          <% end %>
        </div>
  		<% else # show a button to reply or start the discussion %>
        <div>
          <% if @posts.nil? %>
          <span class="hidden-xs pull-right"><%= link_to t(:start_discussion, default: "Start Discussion"), '#', data: {toggle: "modal", target: "#login-modal"}, class: 'btn btn-primary' %></span>
          <% else %>
          <span class="hidden-xs pull-right"><%= link_to t(:reply, default: "Reply"), '#', data: {toggle: "modal", target: "#login-modal"}, class: 'btn btn-primary' %></span>
          <% end %>
        </div>
      <% end %>
  	</div>
  </div>
<% end %>

<div class="col-md-3 hidden-xs hidden-sm"></div>
<div class="col-md-9">
  <%= render 'layouts/did_this_help' %>
</div>
<commit_msg>Reimplement text-content styling on doc content<commit_after><script>
  Helpy.yesHelped = '<%= j t(:yes_helped) %>';
  Helpy.noHelped = '<%= j t(:no_helped) %>';
  Helpy.contactUs = '<a href="<%= new_topic_path(doc_id: @doc.id) %>" class="btn btn-primary btn-lg get-help-button"><%= j t(:start_discussion) %></a>';
</script>

<div class="row content-row">
  <div class="col-md-3 hidden-xs hidden-sm">
    <div id="written-by" class="doc-meta">
      <div class="more-important meta-header"><%= I18n.t("written_by", default: "Written By") %>:</div>
      <div class="less-important">
        <%= avatar_image(@doc.user, size=40) %>
        <%= @doc.user.name.titleize %>
      </div>
    </div>
    <div id="doc-last-edit" class="doc-meta">
      <div class="more-important meta-header"><%= I18n.t("last_edited", default: "Last Edited") %>:</div>
      <div class="less-important"><%= last_active_time(@doc.updated_at) %></div>
    </div>
  </div>
  <div class="col-md-9 text-content">
    <%= @doc.content.html_safe %>
  </div>
</div>

<% if @doc.allow_comments %>
  <div class="row">
    <div class="col-md-3 hidden-xs hidden-sm"></div>
    <div class="col-md-9">
      <hr/>
      <h4><%= @posts.nil? ? "" : t(:topic) %></h4>
    </div>

    <div class="col-md-3 hidden-xs hidden-sm"></div>
  	<div class="col-md-9">
  		<script>
  			Helpy.messages = '<%= j t(:collapsed_messages, count: @posts.count-2) unless @posts.nil? %>';
  		</script>

  		<table id="posts">
  			<%= render :partial => 'comment', :collection => @posts %>
  		</table>

  		<% if user_signed_in? # show a form to reply or start discussion %>
        <div class="add-form">
    			<h4><%= @posts.nil? ? t(:start_discussion) : t(:reply) %></h4>
          <% if @topic %>
      			<%= bootstrap_form_for :post, :url => topic_posts_path(@topic) do |f| -%>
      			  <%= f.text_area :body, rows: 8, cols: 160, skip_label: true %></p>
      			  <%= f.hidden_field 'kind', value: 'reply' %>
      				<div class="add-screenshots">
      				  <%= attachinary_file_field_tag 'post[screenshots]', @post, :screenshots unless Cloudinary.config.cloud_name.nil? %>
      				</div>
      				<%= hidden_field_tag :client_id %>
      				<%= f.submit t(:submit_reply), class: 'btn btn-warning' -%>
      			<% end -%>

          <% else %>
            <%= bootstrap_form_for(Topic.new) do |f| -%>
              <%= text_area :post, :body, :rows => 8, :cols => 160, label: 'Message' -%>
              <div class="add-screenshots">
                <%= attachinary_file_field_tag 'topic[screenshots]', @topic, :screenshots unless Cloudinary.config.cloud_name.nil? %>
              </div>
              <%= hidden_field_tag :client_id %>
              <%= f.hidden_field :name, value: "Discussion on #{@doc.title}" %>
              <%= f.hidden_field :doc_id, value: @doc.id %>
              <%= f.hidden_field :private, value: false %>
              <%= f.hidden_field :forum_id, value: @forum.id %>
              <%= f.submit t(:submit_start_discussion, default: 'Start Discussion'), class: 'btn btn-warning' %>
            <% end -%>
          <% end %>
        </div>
  		<% else # show a button to reply or start the discussion %>
        <div>
          <% if @posts.nil? %>
          <span class="hidden-xs pull-right"><%= link_to t(:start_discussion, default: "Start Discussion"), '#', data: {toggle: "modal", target: "#login-modal"}, class: 'btn btn-primary' %></span>
          <% else %>
          <span class="hidden-xs pull-right"><%= link_to t(:reply, default: "Reply"), '#', data: {toggle: "modal", target: "#login-modal"}, class: 'btn btn-primary' %></span>
          <% end %>
        </div>
      <% end %>
  	</div>
  </div>
<% end %>

<div class="col-md-3 hidden-xs hidden-sm"></div>
<div class="col-md-9">
  <%= render 'layouts/did_this_help' %>
</div>

{'fraction_non_alphanumeric': 0.20919900692538873, 'fraction_numerical': 0.007056056448451587, 'mean_word_length': 2.662200956937799, 'pattern_counts': {'":': 0, '<': 211, '<?xml version=': 0, '>': 221, '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': '1754289', 'n_tokens_mistral': 2938, 'n_tokens_neox': 2678, 'n_words': 561}