<commit_before><template>
  <div>
    <!-- Load from webpack (note the srcPath="dist" prop) -->
    <Monaco
        height="600"
        language="typescript"
        srcPath="dist"
        :code="code"
        :options="options"
        :highlighted="highlightLines"
        :changeThrottle="500"
        theme="vs-dark"
        @mounted="onMounted"
        @codeChange="onCodeChange"
        >
    </Monaco>
    <!-- Load from default cdn -->
    <Monaco
        height="600"
        language="typescript"
        :code="code"
        :options="options"
        :highlighted="highlightLines"
        :changeThrottle="500"
        theme="vs-dark"
        @mounted="onMounted"
        @codeChange="onCodeChange"
        >
    </Monaco>
    <button @click="clickHandler">Log value</button>
    <input v-model="highlightLines[0].number" placeholder="primary highlight #">
    <input v-model="highlightLines[1].number" placeholder="secondary highlight #">
  </div>
</template>

<script>
const Monaco = require('./Monaco.vue')

module.exports = {
  components: {
    Monaco
  },
  data() {
    return {
      code: '// type your code \n',
      highlightLines: [
        {
          number: 0,
          class: 'primary-highlighted-line'
        },
        {
          number: 0,
          class: 'secondary-highlighted-line'
        }
      ]
    };
  },
  methods: {
    onMounted(editor) {
      console.log('after mount!', editor, editor.getValue(), editor.getModel());
      this.editor = editor;
    },
    onCodeChange(editor) {
      console.log('code changed!', 'code:' + this.editor.getValue());
    },
    clickHandler() {
      console.log('here is the code:', this.editor.getValue());
    }
  },
  created() {
    this.options = {
      selectOnLineNumbers: false
    };
  }
};
</script>

<style media="screen">
  .secondary-highlighted-line {
    background: green;
  }
  .primary-highlighted-line {
    background: blue;
  }
</style><commit_msg>Fix example editor instance bug<commit_after><template>
  <div>
    <!-- Load from webpack (note the srcPath="dist" prop) -->
    <Monaco
        height="600"
        language="typescript"
        srcPath="dist"
        :code="code"
        :options="options"
        :highlighted="highlightLines"
        :changeThrottle="500"
        theme="vs-dark"
        @mounted="onMounted"
        @codeChange="onCodeChange"
        >
    </Monaco>
    <!-- Load from default cdn -->
    <Monaco
        height="600"
        language="typescript"
        :code="code"
        :options="options"
        :highlighted="highlightLines"
        :changeThrottle="500"
        theme="vs-dark"
        @mounted="onMounted2"
        @codeChange="onCodeChange2"
        >
    </Monaco>
    <button @click="clickHandler">Log value</button>
    <input v-model="highlightLines[0].number" placeholder="primary highlight #">
    <input v-model="highlightLines[1].number" placeholder="secondary highlight #">
  </div>
</template>

<script>
const Monaco = require('./Monaco.vue')

module.exports = {
  components: {
    Monaco
  },
  data() {
    return {
      code: '// type your code \n',
      highlightLines: [
        {
          number: 0,
          class: 'primary-highlighted-line'
        },
        {
          number: 0,
          class: 'secondary-highlighted-line'
        }
      ]
    };
  },
  methods: {
    onMounted(editor) {
      console.log('after mount!', editor, editor.getValue(), editor.getModel());
      this.editor = editor;
    },
    onMounted2(editor) {
      console.log('after mount!', editor, editor.getValue(), editor.getModel());
      this.editor2 = editor;
    },
    onCodeChange(editor) {
      console.log('code changed!', 'code:' + this.editor.getValue());
    },
    onCodeChange2(editor) {
      console.log('code changed!', 'code:' + this.editor2.getValue());
    },
    clickHandler() {
      console.log('here is the code:', this.editor.getValue());
    }
  },
  created() {
    this.options = {
      selectOnLineNumbers: false
    };
  }
};
</script>

<style media="screen">
  .secondary-highlighted-line {
    background: green;
  }
  .primary-highlighted-line {
    background: blue;
  }
</style>
{'fraction_non_alphanumeric': 0.1562200956937799, 'fraction_numerical': 0.00909090909090909, 'mean_word_length': 2.27921568627451, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 39, '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': '6736055', 'n_tokens_mistral': 1327, 'n_tokens_neox': 1284, 'n_words': 228}