<commit_before>define([
  'summernote/core/agent', 'summernote/core/dom',
  'summernote/settings',
  'summernote/EventHandler', 'summernote/Renderer'
], function (agent, dom, settings, EventHandler, Renderer) {
  // jQuery namespace for summernote
  $.summernote = $.summernote || {};

  // extends default `settings`
  $.extend($.summernote, settings);

  var renderer = new Renderer();
  var eventHandler = new EventHandler();

  /**
   * extend jquery fn
   */
  $.fn.extend({
    /**
     * initialize summernote
     *  - create editor layout and attach Mouse and keyboard events.
     *
     * @param {Object} options
     * @returns {this}
     */
    summernote: function (options) {
      // extend default options
      options = $.extend({}, $.summernote.options, options);

      this.each(function (idx, elHolder) {
        var $holder = $(elHolder);

        // Setup language info with en-US as default
        var langInfo = $.extend(true,{}, $.summernote.lang['en-US'], $.summernote.lang[options.lang]);
        
        // createLayout with options
        renderer.createLayout($holder, options, langInfo);

        var info = renderer.layoutInfoFromHolder($holder);
        // Include langInfo in general info for later us, e.g. for image drag-n-drop
        info.langInfo = langInfo; 
        eventHandler.attach(info, options);

        // Textarea: auto filling the code before form submit.
        if (dom.isTextarea($holder[0])) {
          $holder.closest('form').submit(function () {
            $holder.val($holder.code());
          });
        }
      });
<commit_msg>Fixed typo<commit_after>define([
  'summernote/core/agent', 'summernote/core/dom',
  'summernote/settings',
  'summernote/EventHandler', 'summernote/Renderer'
], function (agent, dom, settings, EventHandler, Renderer) {
  // jQuery namespace for summernote
  $.summernote = $.summernote || {};

  // extends default `settings`
  $.extend($.summernote, settings);

  var renderer = new Renderer();
  var eventHandler = new EventHandler();

  /**
   * extend jquery fn
   */
  $.fn.extend({
    /**
     * initialize summernote
     *  - create editor layout and attach Mouse and keyboard events.
     *
     * @param {Object} options
     * @returns {this}
     */
    summernote: function (options) {
      // extend default options
      options = $.extend({}, $.summernote.options, options);

      this.each(function (idx, elHolder) {
        var $holder = $(elHolder);

        // Setup language info with en-US as default
        var langInfo = $.extend(true,{}, $.summernote.lang['en-US'], $.summernote.lang[options.lang]);
        
        // createLayout with options
        renderer.createLayout($holder, options, langInfo);

        var info = renderer.layoutInfoFromHolder($holder);
        // Include langInfo in general info for later use, e.g. for image drag-n-drop
        info.langInfo = langInfo; 
        eventHandler.attach(info, options);

        // Textarea: auto filling the code before form submit.
        if (dom.isTextarea($holder[0])) {
          $holder.closest('form').submit(function () {
            $holder.val($holder.code());
          });
        }
      });

{'fraction_non_alphanumeric': 0.1408891671884784, 'fraction_numerical': 0.0006261740763932373, 'mean_word_length': 2.55, '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': '5732268', 'n_tokens_mistral': 925, 'n_tokens_neox': 890, 'n_words': 233}