<commit_before><script>
	window['CKEDITOR_BASEPATH'] = "/assets/ckeditor/";

	window.CKEDITOR_ASSETS_MAPPING = {
	<% Rails.application.assets.each_logical_path(->(path){ path =~ /ckeditor/ && path != 'ckeditor/override.js' }) do |asset| %>
	  "<%= asset %>": "<%= asset_path(asset) %>",
	<% end %>
	}

	window.CKEDITOR_GETURL = function( resource ) {
	  // If this is not a full or absolute path.
	  if ( resource.indexOf( ':/' ) == -1 && resource.indexOf( '/' ) !== 0 )
	    resource = this.basePath + resource;

	  // Add the timestamp, except for directories.
	  if ( resource.charAt( resource.length - 1 ) != '/'  ){
	    var url = resource.match( /^(.*?:\/\/[^\/]*)\/assets\/(.+)/ );
	    if(url) resource = (CKEDITOR_ASSETS_MAPPING[url[2]] || '/assets/' + url[2]);
	  }

	  return resource;
	}
</script>
<%= javascript_include_tag 'ckeditor/init' %>

<script>
  $(function() {
    var ids = [<%= raw ids.map{|id| "'#{id}'"}.join(', ') %>];
    for (var key in ids) {
      if ($('#' + ids[key]).length > 0) {
        CKEDITOR.replace(ids[key]);
      }
    }
  });
</script><commit_msg>remove problematic code, fixes #80 and #101<commit_after><script>
	window['CKEDITOR_BASEPATH'] = "/assets/ckeditor/";
</script>

<%= javascript_include_tag 'ckeditor/init' %>

<script>
  $(function() {
    var ids = [<%= raw ids.map{|id| "'#{id}'"}.join(', ') %>];
    for (var key in ids) {
      if ($('#' + ids[key]).length > 0) {
        CKEDITOR.replace(ids[key]);
      }
    }
  });
</script>
{'fraction_non_alphanumeric': 0.23340040241448692, 'fraction_numerical': 0.008048289738430584, 'mean_word_length': 3.0765027322404372, 'pattern_counts': {'":': 1, '<': 19, '<?xml version=': 0, '>': 22, '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': '973643', 'n_tokens_mistral': 590, 'n_tokens_neox': 533, 'n_words': 103}