<commit_before>import React, { Component } from 'react';
import PropTypes from 'prop-types';

const { ipcRenderer, shell } = require('electron');

const showdown = require('showdown');

class ReleaseInfo extends Component {
  constructor() {
    super();
    this.state = {
      markdown: null,
    };
  }
  componentWillMount() {
    fetch('https://raw.githubusercontent.com/tahnik/devRantron/update-md/UPDATE.md')
      .then((res) => {
        res.text().then((latestRelease) => {
          const converter = new showdown.Converter();
          const html = converter.makeHtml(latestRelease);
          this.setState({ markdown: html });
        });
      });
  }
  static handleUpdate() {
    let plat = '';

    if (/^win/.test(process.platform)) { plat = 'windows'; }
    if (/^dar/.test(process.platform)) { plat = 'osx'; }
    if (/^lin/.test(process.platform)) { plat = 'linux'; }

    if (plat === 'windows') {
      ipcRenderer.send('updateNow', true);
    } else {
      shell.openExternal('https://devrantron.firebaseapp.com/');
    }
  }
  render() {
    const { close } = this.props;
    return (
      <div className="modal">
        <div className="release_info_container">
          <div className="release_info">
            {
              this.state.markdown === '' ?
                <div>Fetching release note</div> :
                <div dangerouslySetInnerHTML={{ __html: this.state.markdown }} /><commit_msg>updated release info url<commit_after>import React, { Component } from 'react';
import PropTypes from 'prop-types';

const { ipcRenderer, shell } = require('electron');

const showdown = require('showdown');

class ReleaseInfo extends Component {
  constructor() {
    super();
    this.state = {
      markdown: null,
    };
  }
  componentWillMount() {
    fetch('https://raw.githubusercontent.com/tahnik/devRantron/master/update.md')
      .then((res) => {
        res.text().then((latestRelease) => {
          const converter = new showdown.Converter();
          const html = converter.makeHtml(latestRelease);
          this.setState({ markdown: html });
        });
      });
  }
  static handleUpdate() {
    let plat = '';

    if (/^win/.test(process.platform)) { plat = 'windows'; }
    if (/^dar/.test(process.platform)) { plat = 'osx'; }
    if (/^lin/.test(process.platform)) { plat = 'linux'; }

    if (plat === 'windows') {
      ipcRenderer.send('updateNow', true);
    } else {
      shell.openExternal('https://devrantron.firebaseapp.com/');
    }
  }
  render() {
    const { close } = this.props;
    return (
      <div className="modal">
        <div className="release_info_container">
          <div className="release_info">
            {
              this.state.markdown === '' ?
                <div>Fetching release note</div> :
                <div dangerouslySetInnerHTML={{ __html: this.state.markdown }} />
{'fraction_non_alphanumeric': 0.16307371349095967, 'fraction_numerical': 0.0, 'mean_word_length': 2.5300613496932516, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 19, 'https://': 4, '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': '4324669', 'n_tokens_mistral': 868, 'n_tokens_neox': 844, 'n_words': 165}