<commit_before>import React from 'react';
const prefixCls = 'ant-tag';
import { transitionEndEvent, addEventListenerOnce } from '../util/index';

import Animate from 'rc-animate';

class AntTag extends React.Component {
  constructor(props) {
    super(props);

    this.state = {
      closing: true,
      closed: false
    };
  }

  close(e) {
    let dom = React.findDOMNode(this);
    dom.style.width = dom.offsetWidth + 'px';
    // It's Magic Code, don't know why
    dom.style.width = dom.offsetWidth + 'px';
    this.setState({
      closing: false
    });

    this.props.onClose.call(this, e);
  }
  animationEnd() {
    this.setState({
      closed: true,
      closing: true
    });
  }

  render() {
    let close = this.props.closable ?
      <i className="anticon anticon-cross" onClick={this.close.bind(this)}></i> : '';
    let colorClass = this.props.color ? this.props.prefixCls + '-' + this.props.color : '';

    let className = this.props.prefixCls + ' ' + colorClass;
    className = !this.state.closing ? className + ' ' + this.props.prefixCls + '-close' : className;

    return this.state.closed ? null
      : <Animate
      component=""
      showProp='data-show'
      transitionName="zoom-tag"
      onEnd={this.animationEnd.bind(this)}>
      <div data-show={this.state.closing} className={className}>
          <a className={this.props.prefixCls + '-text'} {...this.props} />
          {close}
        </div><commit_msg>Fix tag closing meaning<commit_after>import React from 'react';
import Animate from 'rc-animate';
const prefixCls = 'ant-tag';

class AntTag extends React.Component {
  constructor(props) {
    super(props);

    this.state = {
      closing: false,
      closed: false
    };
  }

  close(e) {
    let dom = React.findDOMNode(this);
    dom.style.width = dom.offsetWidth + 'px';
    // It's Magic Code, don't know why
    dom.style.width = dom.offsetWidth + 'px';
    this.setState({
      closing: true
    });
    this.props.onClose.call(this, e);
  }

  animationEnd() {
    this.setState({
      closed: true,
      closing: false
    });
  }

  render() {
    let close = this.props.closable ?
      <i className="anticon anticon-cross" onClick={this.close.bind(this)}></i> : '';
    let colorClass = this.props.color ? this.props.prefixCls + '-' + this.props.color : '';

    let className = this.props.prefixCls + ' ' + colorClass;
    className = this.state.closing ? className + ' ' + this.props.prefixCls + '-close' : className;

    return this.state.closed ? null
      : <Animate component=""
                 showProp='data-show'
                 transitionName="zoom-tag"
                 onEnd={this.animationEnd.bind(this)}>
        <div data-show={!this.state.closing} className={className}>
          <a className={this.props.prefixCls + '-text'} {...this.props} />
          {close}
        </div>
{'fraction_non_alphanumeric': 0.15395332636711948, 'fraction_numerical': 0.0, 'mean_word_length': 2.5588599752168526, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '6578284', 'n_tokens_mistral': 913, 'n_tokens_neox': 894, 'n_words': 185}