<commit_before><% if Rails.application.config.content_types[:all].map(&:name).include?(share.content_page_type) %>
  <%= render partial: 'content_page_shares/stream_page_share', locals: { share: share, content: share.content_page } %>

<% elsif share.content_page_type == Thredded::Topic.name %>
  <%= render partial: 'content_page_shares/stream_discussion', locals: { share: share, content: share.content_page } %>

<% elsif share.content_page_type == PageCollection.name %>
  <%= render partial: 'content_page_shares/stream_page_collection', locals: { share: share, content: share.content_page } %>

<% elsif share.content_page_type == Document.name %>
  <%= render partial: 'content_page_shares/stream_document_share', locals: { share: share, content: share.content_page } %>

<% else %>
  <strong>Error loading stream item</strong>
<% end %>

<br /><br />
<div class="show-on-small hide-on-med-and-up">
  &nbsp;
  <br /><br />
</div><commit_msg>skip over stream shares if the content is no longer available<commit_after><% if share.content_page.present? %>
  <% if Rails.application.config.content_types[:all].map(&:name).include?(share.content_page_type) %>
    <%= render partial: 'content_page_shares/stream_page_share', locals: { share: share, content: share.content_page } %>

  <% elsif share.content_page_type == Thredded::Topic.name %>
    <%= render partial: 'content_page_shares/stream_discussion', locals: { share: share, content: share.content_page } %>

  <% elsif share.content_page_type == PageCollection.name %>
    <%= render partial: 'content_page_shares/stream_page_collection', locals: { share: share, content: share.content_page } %>

  <% elsif share.content_page_type == Document.name %>
    <%= render partial: 'content_page_shares/stream_document_share', locals: { share: share, content: share.content_page } %>

  <% else %>
    <strong>Error loading stream item</strong>
  <% end %>

  <br /><br />
  <div class="show-on-small hide-on-med-and-up">
    &nbsp;
    <br /><br />
  </div>
<% end %>
{'fraction_non_alphanumeric': 0.16148148148148148, 'fraction_numerical': 0.0, 'mean_word_length': 5.065868263473054, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 41, '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': '7566569', 'n_tokens_mistral': 693, 'n_tokens_neox': 645, 'n_words': 130}