<commit_before>import React, { Component, PropTypes } from 'react';
import './DemoPageComponentShortInfo.less';
import RepositoryInfoFilesViewer from '../RepositoryInfoFilesViewer';
const svgGit = require('!!raw-loader!../../img/git-logo.svg');
const svgGithub = require('!!raw-loader!../../img/github-logo.svg');

export default
class DemoPageComponentShortInfo extends Component {
  prepareGitRepoUrl(url) {
    if (!url) {
      return '';
    }
    return url.
      replace(/^git[+]/gi, '').
      replace(/^git\:\/\//gi, '//').
      replace('/git/', '/gitweb/').
      replace(/gitweb\/(.*)\.git$/gi, 'gitweb/?p=$1.git;');
  }
<commit_msg>Fix. In case when repository is located on GitHub, use GitHub icon<commit_after>import React, { Component, PropTypes } from 'react';
import './DemoPageComponentShortInfo.less';
import RepositoryInfoFilesViewer from '../RepositoryInfoFilesViewer';
const svgGit = require('!!raw-loader!../../img/git-logo.svg');
const svgGithub = require('!!raw-loader!../../img/github-logo.svg');

export default
class DemoPageComponentShortInfo extends Component {
  prepareGitRepoUrl(url) {
    if (!url) {
      return '';
    }

    // TODO Improve regex-s
    const shouldConvertToGithubUrl = !(/.*gitweb.*/.test(url) || /.*github.*/.test(url));
    if(shouldConvertToGithubUrl) {
      return `https://github.com/${url}`;
    }
    return url.
      replace(/^git[+]/gi, '').
      replace(/^git\:\/\//gi, '//').
      replace('/git/', '/gitweb/').
      replace(/gitweb\/(.*)\.git$/gi, 'gitweb/?p=$1.git;');
  }

{'fraction_non_alphanumeric': 0.20749838396897222, 'fraction_numerical': 0.001292824822236587, 'mean_word_length': 3.2295081967213113, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '536327', 'n_tokens_mistral': 511, 'n_tokens_neox': 498, 'n_words': 93}