<commit_before>var comment = require('./comment.json');

module.exports = {
    UNSUPPORTED_SINGLE_LINE_EXTENSIONS: ['htm', 'html', 'md', 'css'],
    DEFAULT_PREFIX: '#',
    DEFAULT_SUFFIX: '\n',
    LINE_REGEX: /(\s*)(.*)/i,

    toggle: function(range, text, ext, editor) {
        if (this.isMultilineSelected(range)) {
            this.toggleMultilineCommentsWithRange(editor, range, text, ext);
        } else {
            this.toggleSingleCommentsWithRange(editor, range, text, ext);
        }
    },

    toggleMultilineCommentsWithRange: function(editor, range, text, ext) {
        if (this.supportsMultiline(ext)) {
            modifiedText = this.toggleComments(text, ext, 'multiline');
        } else {
            modifiedText = this.toggleCommentsForUnsupportedMultiline(
                text, ext);
        }

        editor.setTextInBufferRange(range, modifiedText);
    },
<commit_msg>fixed, single line for xml<commit_after>var comment = require('./comment.json');

module.exports = {
    UNSUPPORTED_SINGLE_LINE_EXTENSIONS: ['htm', 'html', 'md', 'css', 'xml'],
    DEFAULT_PREFIX: '#',
    DEFAULT_SUFFIX: '\n',
    LINE_REGEX: /(\s*)(.*)/i,

    toggle: function(range, text, ext, editor) {
        if (this.isMultilineSelected(range)) {
            this.toggleMultilineCommentsWithRange(editor, range, text, ext);
        } else {
            this.toggleSingleCommentsWithRange(editor, range, text, ext);
        }
    },

    toggleMultilineCommentsWithRange: function(editor, range, text, ext) {
        if (this.supportsMultiline(ext)) {
            modifiedText = this.toggleComments(text, ext, 'multiline');
        } else {
            modifiedText = this.toggleCommentsForUnsupportedMultiline(
                text, ext);
        }

        editor.setTextInBufferRange(range, modifiedText);
    },

{'fraction_non_alphanumeric': 0.13566739606126915, 'fraction_numerical': 0.0, 'mean_word_length': 2.7946058091286305, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '3265389', 'n_tokens_mistral': 573, 'n_tokens_neox': 534, 'n_words': 101}