<commit_before><% content_for :javascript do %>
  <script>
    <%= render 'backbone/currentUser' %>

    var Fact = new Fact(<%= Facts::Fact.for(fact: @fact, view: self, modal: @modal).to_json.html_safe %>);
    var View = new FactView({
      model: Fact
    })
    View.render();
    $('div.modal').append(View.el);
    parent.$(parent.document).trigger("modalready");
    window.fact_id = "<%= @fact.id %>";
  </script>
<% end %><commit_msg>Highlight new Factlink after creation<commit_after><% content_for :javascript do %>
  <script>
    <%= render 'backbone/currentUser' %>

    var Fact = new Fact(<%= Facts::Fact.for(fact: @fact, view: self, modal: @modal).to_json.html_safe %>);
    var View = new FactView({
      model: Fact
    })
    View.render();
    $('div.modal').append(View.el);

    parent.$(parent.document).trigger("modalready");

    window.fact_id = "<%= @fact.id %>";

    if( parent.remote ) {
      parent.remote.highlightNewFactlink("<%= @fact.data.displaystring %>", "<%= @fact.id %>");
    }

  </script>
<% end %>
{'fraction_non_alphanumeric': 0.2049808429118774, 'fraction_numerical': 0.0, 'mean_word_length': 3.4279661016949152, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, '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': '3726675', 'n_tokens_mistral': 382, 'n_tokens_neox': 342, 'n_words': 69}