<commit_before>/* Editor is the hub of every objects working to improve the writing experience. */
function Editor() {
    /* Outlets */
    this.markdown = $("#markdown"); // The div where is the markdown textarea.
    this.conversionDiv = $("#html-conversion");

    /* Variables */
    this.counter = new Counter(this.markdown[0]); // Counter of words/characters.
    this.displayManager = new DisplayManager(this); // Convert the markdown in HTML.
    this.helpManager = new HelpManager(); // Manage the help
    this.imageManager = new ImageManager(this); // Manage the button to add offline images.
    this.linkManager = new LinkManager(this); // Manage the button to add links.
    this.nameManager = new NameManager(this); // Manage the name of the file written.
    this.saveStateManager = new SaveStateManager(this); // Manage the save state of the file.
    this.scrollManager = new ScrollManager(this.markdown, this.conversionDiv); // Object allowing a synchronized scroll between the convertedDiv and the conversionDiv.
    this.webImageManager = new WebImageManager(this); // Manage the button to add online images.

    /* Events */
    this.markdown.on("input propertychange", $.proxy(function() { this.convert(); }, this)); // Conversion when there is a change in the markdown textarea.
    this.markdown.on("keydown", function(e) {
        if (e.keyCode === 9) {
            e.preventDefault();
            var start = this.selectionStart;
            var end = this.selectionEnd;

            // set textarea value to: text before caret + tab + text after caret
            $(this).val($(this).val().substring(0, start) + "    " + $(this).val().substring(end));

            // put caret at right position again
            this.selectionStart = this.selectionEnd = start + 4;
        }
    });

    /* Initialization */
    this.init();
}

Editor.prototype = {
    constructor: Editor,

    /* Automatic scroll depending on the height of the two zones. */
    checkHeight: function() {
        this.scrollManager.checkZonesHeight();
    },

    /* Update the objects that have to change when the markdown area is changed. */
    convert: function() {<commit_msg>Conversion when tabulation.<commit_after>/* Editor is the hub of every objects working to improve the writing experience. */
function Editor() {
    /* Outlets */
    this.markdown = $("#markdown"); // The div where is the markdown textarea.
    this.conversionDiv = $("#html-conversion");

    /* Variables */
    this.counter = new Counter(this.markdown[0]); // Counter of words/characters.
    this.displayManager = new DisplayManager(this); // Convert the markdown in HTML.
    this.helpManager = new HelpManager(); // Manage the help
    this.imageManager = new ImageManager(this); // Manage the button to add offline images.
    this.linkManager = new LinkManager(this); // Manage the button to add links.
    this.nameManager = new NameManager(this); // Manage the name of the file written.
    this.saveStateManager = new SaveStateManager(this); // Manage the save state of the file.
    this.scrollManager = new ScrollManager(this.markdown, this.conversionDiv); // Object allowing a synchronized scroll between the convertedDiv and the conversionDiv.
    this.webImageManager = new WebImageManager(this); // Manage the button to add online images.

    /* Events */
    this.markdown.on("input propertychange", $.proxy(function() { this.convert(); }, this)); // Conversion when there is a change in the markdown textarea.

    this.markdown.on("keydown", function(e) {
        if (e.keyCode === 9) {
            e.preventDefault();
            var start = this.selectionStart;
            var end = this.selectionEnd;

            // set textarea value to: text before caret + tab + text after caret
            $(this).val($(this).val().substring(0, start) + "    " + $(this).val().substring(end));

            // put caret at right position again
            this.selectionStart = this.selectionEnd = start + 4;
        }
    });
    this.markdown.on("keydown", $.proxy(function(e) { if (e.keyCode === 9) { this.convert(); }}, this));

    /* Initialization */
    this.init();
}

Editor.prototype = {
    constructor: Editor,

    /* Automatic scroll depending on the height of the two zones. */
    checkHeight: function() {
        this.scrollManager.checkZonesHeight();
    },

    /* Update the objects that have to change when the markdown area is changed. */
    convert: function() {
{'fraction_non_alphanumeric': 0.12215782434239858, 'fraction_numerical': 0.0020062416406598305, 'mean_word_length': 2.8647717484926787, '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': '4076747', 'n_tokens_mistral': 1211, 'n_tokens_neox': 1155, 'n_words': 405}