<commit_before>import React, { Component, PropTypes } from 'react';
import styles from '../../chat.scss';
import emojify from '../../utils/emojify';

export default class VideoContainer extends Component {
  constructor(props) {
    super(props);
    this.state = {
      emojiSrc: ''
    };
  }

  componentWillMount() {
    this.setState({
      emojiSrc: this.props.src.replace(/<img[^>]+>(<\/img>)?|<iframe.+?<\/iframe>/ig, '')
    });
  }
  componentDidMount() {
    this.contentMsg.innerHTML = this.props.src.match(/<img[^>]+>(<\/img>)?|<iframe.+?<\/iframe>/ig);
  }
  componentWillReceiveProps() {
    this.setState({
      emojiSrc: this.props.src.replace(/<img[^>]+>(<\/img>)?|<iframe.+?<\/iframe>/ig, '')
    });
  }
  componentDidUpdate() {
    this.contentMsg.innerHTML = this.props.src.match(/<img[^>]+>(<\/img>)?|<iframe.+?<\/iframe>/ig);
    return true;
  }
  mapRef = (node) => {
    this.contentMsg = node;
  };<commit_msg>Fix regex for link messages<commit_after>import React, { Component, PropTypes } from 'react';
import styles from '../../chat.scss';
import emojify from '../../utils/emojify';

export default class VideoContainer extends Component {
  constructor(props) {
    super(props);
    this.state = {
      emojiSrc: ''
    };
    this.exp = /<img[^>]+>(<\/img>)?|<iframe.+?<\/iframe>|<a[^>]*>([^<]+)(<\/a>)?/ig;
  }

  componentWillMount() {
    this.setState({
      emojiSrc: this.props.src.replace(this.exp, '')
    });
  }
  componentDidMount() {
    this.contentMsg.innerHTML = this.props.src.match(this.exp);
  }
  componentWillReceiveProps() {
    this.setState({
      emojiSrc: this.props.src.replace(this.exp, '')
    });
  }
  componentDidUpdate() {
    this.contentMsg.innerHTML = this.props.src.match(this.exp);
    return true;
  }
  mapRef = (node) => {
    this.contentMsg = node;
  };
{'fraction_non_alphanumeric': 0.21701199563794984, 'fraction_numerical': 0.0, 'mean_word_length': 3.1704545454545454, 'pattern_counts': {'":': 0, '<': 26, '<?xml version=': 0, '>': 28, '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': '4999879', 'n_tokens_mistral': 653, 'n_tokens_neox': 630, 'n_words': 94}