<commit_before><template>
    <codemirror ref="editor" :value="value" :options="cmOptions"></codemirror>
</template>

<script>
    import 'codemirror/mode/properties/properties.js';
    import 'codemirror/mode/groovy/groovy.js';
    import 'codemirror/mode/python/python.js';
    import 'codemirror/mode/javascript/javascript.js';
    import 'codemirror/mode/htmlmixed/htmlmixed';
    import 'codemirror/mode/xml/xml';

    import 'codemirror/addon/display/fullscreen.js';
    import 'codemirror/addon/dialog/dialog.js';
    import 'codemirror/addon/search/search.js';
    import 'codemirror/addon/selection/active-line.js';

    import Component from 'vue-class-component';
    import { codemirror } from 'vue-codemirror';

    import Base from '../Base.vue';

    @Component({
        name: 'codeMirror',
        components: { codemirror },
        props: {
            value: {
                type: String,
                required: false,
                default: '',
            },
            options: {
                type: Object,
                required: false,
            },
        },
    })
    export default class CodeMirror extends Base {
        mounted() {
            Object.assign(this.cmOptions, this.options);
        }

        get cmOptions() {
            return {
                mode: 'groovy',
                theme: 'eclipse',
                line: true,
                lineNumbers: true,
                lineWrapping: true,
                indentUnit: 4,
                tabSize: 4,
                indentWithTabs: true,
                smartIndent: false,
                lineSeparator: navigator.platform.includes('Win') ? '\r\n' : '\n',
                visibleTab: true,
                readOnly: false,
                styleActiveLine: true,
                extraKeys: {
                    'F11': function(cm) {
                        cm.setOption('fullScreen', !cm.getOption('fullScreen'));
                    },
                    'Esc': function(cm) {
                        if (cm.getOption('fullScreen')) cm.setOption('fullScreen', false);
                    },
                    Tab: 'indentMore',
                },
                ...this.options,
            };
        }

        get codemirror() {
            return this.$refs.editor.codemirror;<commit_msg>Remove line separator option from codemirror<commit_after><template>
    <codemirror ref="editor" :value="value" :options="cmOptions"></codemirror>
</template>

<script>
    import 'codemirror/mode/properties/properties.js';
    import 'codemirror/mode/groovy/groovy.js';
    import 'codemirror/mode/python/python.js';
    import 'codemirror/mode/javascript/javascript.js';
    import 'codemirror/mode/htmlmixed/htmlmixed';
    import 'codemirror/mode/xml/xml';

    import 'codemirror/addon/display/fullscreen.js';
    import 'codemirror/addon/dialog/dialog.js';
    import 'codemirror/addon/search/search.js';
    import 'codemirror/addon/selection/active-line.js';

    import Component from 'vue-class-component';
    import { codemirror } from 'vue-codemirror';

    import Base from '../Base.vue';

    @Component({
        name: 'codeMirror',
        components: { codemirror },
        props: {
            value: {
                type: String,
                required: false,
                default: '',
            },
            options: {
                type: Object,
                required: false,
            },
        },
    })
    export default class CodeMirror extends Base {
        mounted() {
            Object.assign(this.cmOptions, this.options);
        }

        get cmOptions() {
            return {
                mode: 'groovy',
                theme: 'eclipse',
                line: true,
                lineNumbers: true,
                lineWrapping: true,
                indentUnit: 4,
                tabSize: 4,
                indentWithTabs: true,
                smartIndent: false,
                visibleTab: true,
                readOnly: false,
                styleActiveLine: true,
                extraKeys: {
                    'F11': function(cm) {
                        cm.setOption('fullScreen', !cm.getOption('fullScreen'));
                    },
                    'Esc': function(cm) {
                        if (cm.getOption('fullScreen')) cm.setOption('fullScreen', false);
                    },
                    Tab: 'indentMore',
                },
                ...this.options,
            };
        }

        get codemirror() {
            return this.$refs.editor.codemirror;
{'fraction_non_alphanumeric': 0.11773700305810397, 'fraction_numerical': 0.0017474879860200961, 'mean_word_length': 1.476473769605192, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '413942', 'n_tokens_mistral': 1319, 'n_tokens_neox': 1226, 'n_words': 228}