<commit_before><% if resource.errors.any? -%>
  $("#modal-for-nav-item").html("<%= escape_javascript render( "modal_nav_item") %>");
<% else %>
  $("#modal-for-nav-item").modal('hide');

  var $parent = $("#nav-item-<%= resource.parent.id %>");
  var $children = $parent.find (".children");
  if (! $children.length) $children = $parent.append ("<ol class='children'>").slideDown ();
  $children.append ("<%= escape_javascript render("nav_item", nav_item: resource, level: resource.parent.level + 1) %>")
  $("#nav-item-<%= resource.id %>").slideDown ().effect("highlight", {}, 3000);
<% end %>
<commit_msg>Fix for site-tree node creation.<commit_after><% if resource.errors.any? -%>

  $ ("#modal-for-nav-item").html ("<%= escape_javascript render ("modal_nav_item") %>");

<% else %>

  $ ("#modal-for-nav-item").modal ('hide');

  var rendered = "<%= escape_javascript render ("nav_item", nav_item: resource, level: resource.level) %>";
  
  var $parent = $ ("#nav-item-<%= resource.parent.id %>");
  var $children = $parent.component (".children");

  if (! $children.length) $children = $parent.append ("<ol class='children'>").slideDown ();

  $children.append (rendered);

  $ ("#nav-item-<%= resource.id %>").slideDown ().effect ("highlight", {}, 3000);

<% end %>

{'fraction_non_alphanumeric': 0.24901806755695208, 'fraction_numerical': 0.007069913589945012, 'mean_word_length': 4.790909090909091, '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': '1868763', 'n_tokens_mistral': 449, 'n_tokens_neox': 408, 'n_words': 83}