<commit_before>import React, {Component, PropTypes} from 'react';
import {injectIntl} from 'react-intl';

// a shorthand code of formatMessage
export default function injectF(Target) {

  @injectIntl
  class InjectedF extends Component {

    static propTypes = {
      intl: PropTypes.object.isRequired
    };

    render() {
      const {intl: {formatMessage}} = this.props;
      const f = (data, params) => {
        if ('string' === typeof data) {
          return formatMessage({id: data}, params);
        }
        return formatMessage(data);
      };
      return <Target {...this.props} f={f} />;
    }
  }
  return InjectedF;
}<commit_msg>add fh ( formatHTMLMessage ) function<commit_after>import React, {Component, PropTypes} from 'react';
import {injectIntl} from 'react-intl';

// a shorthand code of formatMessage
export default function injectF(Target) {

  @injectIntl
  class InjectedF extends Component {

    static propTypes = {
      intl: PropTypes.object.isRequired
    };

    render() {
      const {intl: {formatMessage, formatHTMLMessage}} = this.props;

      const f = (data, params) => {
        if ('string' === typeof data) {
          return formatMessage({id: data}, params);
        }
        return formatMessage(data);
      };

      const fh = (data, params) => {
        if ('string' === typeof data) {
          return formatHTMLMessage({id: data}, params);
        }
        return formatHTMLMessage(data);
      };
      return <Target {...this.props} f={f} fh={fh} />;
    }
  }
  return InjectedF;
}
{'fraction_non_alphanumeric': 0.13333333333333333, 'fraction_numerical': 0.0, 'mean_word_length': 2.6376470588235295, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 8, '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': '1270011', 'n_tokens_mistral': 469, 'n_tokens_neox': 456, 'n_words': 125}