<commit_before><%
html = share.embeded_html
doc =  Nokogiri::HTML(html)
html = doc.xpath('//object').to_s

thumbnail_width = share.thumbnail_width
thumbnail_height = share.thumbnail_height
if thumbnail_width.blank? || thumbnail_width.to_i > maxwidth
  thumbnail_width = maxwidth
  thumbnail_height = nil
end

thumbnail_img = tag(:img, {:src => share.thumbnail_url, :width => thumbnail_width, :height => thumbnail_height, :title => share.name, :alt => share.name, :id => "post_stream_thumbnail_#{post.id}", :class => 'post_stream_thumbnail'}.delete_if{|k,v| v.blank?})

%>
<% if share.thumbnail_url -%>
  <a href="javascript:void(0);" onclick="PostStream.embed('<%= jvh html %>', '<%= post.id %>');"><%= thumbnail_img %></a>
  <%= content_tag(:div, '', {:id => "post_stream_embed_#{post.id}", :class => 'post_stream_embed', :style => "display:none; width:#{share.width}px; height:#{share.height}px;"}) %>
<% elsif html -%>
  <%= content_tag(:div, html, {:id => "post_stream_embed_#{post.id}", :class => 'post_stream_embed', :style => "width:#{share.width}px; height:#{share.height}px;"}) %><commit_msg>Display the html provided.<commit_after><%
html = share.embeded_html

thumbnail_width = share.thumbnail_width
thumbnail_height = share.thumbnail_height
if thumbnail_width.blank? || thumbnail_width.to_i > maxwidth
  thumbnail_width = maxwidth
  thumbnail_height = nil
end

thumbnail_img = tag(:img, {:src => share.thumbnail_url, :width => thumbnail_width, :height => thumbnail_height, :title => share.name, :alt => share.name, :id => "post_stream_thumbnail_#{post.id}", :class => 'post_stream_thumbnail'}.delete_if{|k,v| v.blank?})

%>
<% if share.thumbnail_url -%>
  <a href="javascript:void(0);" onclick="PostStream.embed('<%= jvh html %>', '<%= post.id %>');"><%= thumbnail_img %></a>
  <%= content_tag(:div, '', {:id => "post_stream_embed_#{post.id}", :class => 'post_stream_embed', :style => "display:none; width:#{share.width}px; height:#{share.height}px;"}) %>
<% elsif html -%>
  <%= content_tag(:div, html, {:id => "post_stream_embed_#{post.id}", :class => 'post_stream_embed', :style => "width:#{share.width}px; height:#{share.height}px;"}) %>
{'fraction_non_alphanumeric': 0.21040408732001858, 'fraction_numerical': 0.0009289363678588017, 'mean_word_length': 6.692857142857143, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 51, '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': '2759926', 'n_tokens_mistral': 794, 'n_tokens_neox': 772, 'n_words': 133}