<commit_before>(function ()
{
  var self = {};

  var mainTemplate = "<ul class='list standard'></ul>";
  var noteTemplate = "<li data-id='' class='note'>"
                   +   "<span class='time'></span>"
                   +   "<span class='text'></span>"
                   +   "<ul class='tags'></ul>"
                   +   "<div class='controls'>"
                   +   "</div>"
                   +   "<ul class='subnotes'></ul>"
                   + "</li>";
  var tagTemplate = "<li></li>";

  shownoteseditor.lists.standard = function (options, cb)
  {
    console.log("List-Standard init", options);

    $(options.element).replaceWith(mainTemplate);
    this.element = $("ul.list.standard:first");

    cb();
  };

  self.addNote = function (id, note, parent)
  {
    var $note = $(noteTemplate);
    $note.attr('data-id', id);
    $note.find('.time').text(osftools.toHumanTime(note.time));
    $note.find('.text').text(note.text);

    var $tags = $note.find('.tags');
    for (var tag in note.tags)
    {
      tag = note.tags[tag];
      var $tag = $(tagTemplate);
      $tag.text(tag);
      $tags.append($tag);
    }

    if(parent == "_root")
    {
      this.element.append($note);
    }
    else
    {
      var $parent = this.element.find("li[data-id=" + parent + "]");
      $parent.append($note);
    }
  };

  self.removeNote = function (id)
  {
  };
<commit_msg>fixed subnotes in lists/standard<commit_after>(function ()
{
  var self = {};

  var mainTemplate = "<ul class='list standard'></ul>";
  var noteTemplate = "<li data-id='' class='note'>"
                   +   "<span class='time'></span>"
                   +   "<span class='text'></span>"
                   +   "<ul class='tags'></ul>"
                   +   "<div class='controls'>"
                   +   "</div>"
                   +   "<ul class='subnotes'></ul>"
                   + "</li>";
  var tagTemplate = "<li></li>";

  shownoteseditor.lists.standard = function (options, cb)
  {
    console.log("List-Standard init", options);

    $(options.element).replaceWith(mainTemplate);
    this.element = $("ul.list.standard:first");

    cb();
  };

  self.addNote = function (id, note, parent)
  {
    var $note = $(noteTemplate);
    $note.attr('data-id', id);
    $note.find('.time').text(osftools.toHumanTime(note.time));
    $note.find('.text').text(note.text);

    var $tags = $note.find('.tags');
    for (var tag in note.tags)
    {
      tag = note.tags[tag];
      var $tag = $(tagTemplate);
      $tag.text(tag);
      $tags.append($tag);
    }

    var $parent;

    if(parent == "_root")
    {
      $parent = this.element;
    }
    else
    {
      $parent = this.element.find("li[data-id=" + parent + "] ul.subnotes");
    }

    $parent.append($note);
  };

  self.removeNote = function (id)
  {
  };

{'fraction_non_alphanumeric': 0.20070921985815604, 'fraction_numerical': 0.0, 'mean_word_length': 2.069640914036997, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 35, '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': '5252451', 'n_tokens_mistral': 935, 'n_tokens_neox': 910, 'n_words': 162}