<commit_before>'use strict';
define(['scribe', 'formatters/filter-for-export'], function (Scribe, FilterForExport) {
  describe('Filter For Export', function () {
    it('filters for export', function () {
      var element = document.createElement('div');
      var scribe = new Scribe(element, { allowBlockElements: true });
      scribe.use(new FilterForExport());
      scribe.setContent('<p>I am not filtered!</p>');

      expect(scribe.getContent()).toEqual('<p>I am not filtered!</p>');

      HTMLParagraphElement.prototype.filterForExport = function () {
        this.innerText = "I was filtered!";
      }

      expect(scribe.getContent()).toEqual('<p>I was filtered!</p>');

      delete HTMLParagraphElement.prototype.filterForExport;

      expect(scribe.getContent()).toEqual('<p>I am not filtered!</p>');
    });
  });
});<commit_msg>firefox prototypes don't update already created elements<commit_after>'use strict';
define(['scribe', 'formatters/filter-for-export'], function (Scribe, FilterForExport) {
  describe('Filter For Export', function () {
    it('filters for export', function () {
      var element = document.createElement('div');
      var scribe = new Scribe(element, { allowBlockElements: true });
      scribe.use(new FilterForExport());

      scribe.setContent('<p>I am not filtered!</p>');
      expect(scribe.getContent()).toEqual('<p>I am not filtered!</p>');

      HTMLParagraphElement.prototype.filterForExport = function () {
        this.innerText = "I was filtered!";
      }

      scribe.setContent('<p>I am not filtered!</p>');
      expect(scribe.getContent()).toEqual('<p>I was filtered!</p>');

      delete HTMLParagraphElement.prototype.filterForExport;

      scribe.setContent('<p>I am not filtered!</p>');
      expect(scribe.getContent()).toEqual('<p>I am not filtered!</p>');
    });
  });
});
{'fraction_non_alphanumeric': 0.16999460334592553, 'fraction_numerical': 0.0, 'mean_word_length': 3.9705093833780163, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, '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': '4880392', 'n_tokens_mistral': 538, 'n_tokens_neox': 523, 'n_words': 112}