<commit_before>import React from "react";
import {langArrayHandler, multipleArrTransformer} from '../utilities';

import {Link} from 'react-router-dom';

require("!style-loader!css-loader!sass-loader!./AuthorCard.scss");

class AuthorCard extends React.Component {
  constructor() {
    super();
    this.authorExternalLink = null;
  }
  componentWillMount() {
    let authorDescription = this.props.data.description;
    let linksResolver = /(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w\.-]*)*\/?/;
    authorDescription.map((description) => {
      for (let key in description) {
        let link = description[key].match(linksResolver);
        if (link) {
          this.authorExternalLink = link[0];
          description[key] = description[key].replace(linksResolver,``);
        }
      }//<a href=${link[0]} class="author-more-info" target="_blank">${key == 'ru' ? 'Больше информации' : 'More info'}</a>
    })
  }

    render() {
      let author = this.props.data;
      let lang = this.props.lang;
      let contacts = [];
      if(author.contacts !== undefined) {
        contacts = multipleArrTransformer(author.contacts);
      }
        return <div className="AuthorCard">
          <h2>{ author.isCustom  ? langArrayHandler(author.name, lang) : <Link to={'/People/' + author._id}>{langArrayHandler(author.name, lang)}</Link> }</h2>
          <p className={langArrayHandler(author.description, lang).trim() != '' ? '' : 'hidden'} dangerouslySetInnerHTML={{__html:langArrayHandler(author.description, lang)}}></p>
          {this.authorExternalLink ? <a href={this.authorExternalLink} target="_blank">{lang == 'ru' ? 'Больше информации' : 'More info'}</a> : ''}<commit_msg>remove comment<commit_after>import React from "react";
import {langArrayHandler, multipleArrTransformer} from '../utilities';

import {Link} from 'react-router-dom';

require("!style-loader!css-loader!sass-loader!./AuthorCard.scss");

class AuthorCard extends React.Component {
  constructor() {
    super();
    this.authorExternalLink = null;
  }
  componentWillMount() {
    let authorDescription = this.props.data.description;
    let linksResolver = /(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w\.-]*)*\/?/;
    authorDescription.map((description) => {
      for (let key in description) {
        let link = description[key].match(linksResolver);
        if (link) {
          this.authorExternalLink = link[0];
          description[key] = description[key].replace(linksResolver,``);
        }
      }
    })
  }

    render() {
      let author = this.props.data;
      let lang = this.props.lang;
      let contacts = [];
      if(author.contacts !== undefined) {
        contacts = multipleArrTransformer(author.contacts);
      }
        return <div className="AuthorCard">
          <h2>{ author.isCustom  ? langArrayHandler(author.name, lang) : <Link to={'/People/' + author._id}>{langArrayHandler(author.name, lang)}</Link> }</h2>
          <p className={langArrayHandler(author.description, lang).trim() != '' ? '' : 'hidden'} dangerouslySetInnerHTML={{__html:langArrayHandler(author.description, lang)}}></p>
          {this.authorExternalLink ? <a href={this.authorExternalLink} target="_blank">{lang == 'ru' ? 'Больше информации' : 'More info'}</a> : ''}
{'fraction_non_alphanumeric': 0.1829305598042215, 'fraction_numerical': 0.00336494340776996, 'mean_word_length': 3.407008086253369, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 25, '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': '336053', 'n_tokens_mistral': 1007, 'n_tokens_neox': 1005, 'n_words': 178}