<commit_before>Template.editReport.onCreated(trackPageView);
Template.editReport.onRendered(function() {
  var tags = makeTagInput('#edit-report-tags');
  this.data.tags.forEach(function(key) {
    tags.materialtags('add', {
      key: key,
      name: Tags.findOne({key}).name
    });
  });
});

Template.editReport.events({
  'submit form': function(evt) {
    evt.preventDefault();
    Meteor.call('updateReport', this._id, Router.current().params.token, {
      text: evt.target['edit-report-text'].value,<commit_msg>can't edit an empty report<commit_after>Template.editReport.onCreated(trackPageView);
Template.editReport.onRendered(function() {
  var tags = makeTagInput('#edit-report-tags');
  this.data.tags.forEach(function(key) {
    tags.materialtags('add', {
      key: key,
      name: Tags.findOne({key}).name
    });
  });
});

Template.editReport.events({
  'keyup [type="text"]': function(_, template) {
    checkValid(template.find('form'));
  },
  'submit form': function(evt) {
    evt.preventDefault();
    Meteor.call('updateReport', this._id, Router.current().params.token, {
      text: evt.target['edit-report-text'].value,
{'fraction_non_alphanumeric': 0.1803135888501742, 'fraction_numerical': 0.0, 'mean_word_length': 4.394366197183099, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3273320', 'n_tokens_mistral': 372, 'n_tokens_neox': 378, 'n_words': 50}