<commit_before>

$('#history_popup h2').html('Edited by <%= escape_javascript( User.find_by_id(@ver.whodunnit).try(:name) || "Unknown" ) %> at <%= l(@ver.created_at, format: :civilian) %>');
<%
  diff = if @ver.changeset[:content].present?
    Diffy::Diff.new(@ver.changeset[:content].last, @ver.changeset[:content].first).to_s(:html)
  else
    "No change information"
  end
  %>
$('#history_popup p').html('<%= escape_javascript( diff.html_safe ) %>');
$('#history_popup').foundation('reveal', 'open');
<commit_msg>less context around diffs<commit_after>

$('#history_popup h2').html('Edited by <%= escape_javascript( User.find_by_id(@ver.whodunnit).try(:name) || "Unknown" ) %> at <%= l(@ver.created_at, format: :civilian) %>');
<%
  diff = if @ver.changeset[:content].present?
    Diffy::Diff.new(@ver.changeset[:content].last, @ver.changeset[:content].first, allow_empty_diff: false, context: 3).to_s(:html)
  else
    "No change information"
  end
  %>
$('#history_popup p').html('<%= escape_javascript( diff.html_safe ) %>');
$('#history_popup').foundation('reveal', 'open');

{'fraction_non_alphanumeric': 0.22160664819944598, 'fraction_numerical': 0.002770083102493075, 'mean_word_length': 6.226666666666667, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '6701992', 'n_tokens_mistral': 392, 'n_tokens_neox': 374, 'n_words': 61}