<commit_before>$("<%= escape_javascript(render(:partial=>'each_note',:locals=>{:note=>@note})) %>").prependTo("#all-notes").hide().fadeIn(1000);
$("#tags").html("<%= escape_javascript(render(:partial=>'tags',:locals=>{:tags=>@tags})) %>");
var all_notes = document.querySelector('#all-notes');
var first_note = all_notes.children[0];
loadContentColors([first_note]);

//insert error messages accordingly
<% if !flash[:notice].blank? %>
    $("#flash").html("<div class='notice'><%= escape_javascript(flash[:notice]) %></div>");
    <%= flash[:notice] = nil %>
<% elsif !flash[:alert].blank? %>
    $("#flash").html("<div class='error'><%= escape_javascript(flash[:alert]) %></div>");
    <%= flash[:alert]=nil %>
<% elsif !flash[:warning].blank? %>
    $("#flash").html("<div class='warning'><%= escape_javascript(flash[:warning]) %></div>");
    <%= flash[:warning] = nil %>
<% end %><commit_msg>Fix Empty the textbox after note creation<commit_after>$("<%= escape_javascript(render(:partial=>'each_note',:locals=>{:note=>@note})) %>").prependTo("#all-notes").hide().fadeIn(1000);
$("#tags").html("<%= escape_javascript(render(:partial=>'tags',:locals=>{:tags=>@tags})) %>");
var all_notes = document.querySelector('#all-notes');
var first_note = all_notes.children[0];
loadContentColors([first_note]);

//empty the textbox after creation
var textBox = document.getElementById('new-note');

textBox.value='';
//insert error messages accordingly
<% if !flash[:notice].blank? %>
    $("#flash").html("<div class='notice'><%= escape_javascript(flash[:notice]) %></div>");
    <%= flash[:notice] = nil %>
<% elsif !flash[:alert].blank? %>
    $("#flash").html("<div class='error'><%= escape_javascript(flash[:alert]) %></div>");
    <%= flash[:alert]=nil %>
<% elsif !flash[:warning].blank? %>
    $("#flash").html("<div class='warning'><%= escape_javascript(flash[:warning]) %></div>");
    <%= flash[:warning] = nil %>
<% end %>
{'fraction_non_alphanumeric': 0.27140633108458745, 'fraction_numerical': 0.005189413596263622, 'mean_word_length': 7.493392070484582, 'pattern_counts': {'":': 0, '<': 39, '<?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': '3370120', 'n_tokens_mistral': 645, 'n_tokens_neox': 608, 'n_words': 95}