<commit_before>import React from 'react';
import numeral from 'numeral';

import Icon from "./icon";

export default (props) => {
  const formattedFileSize = numeral(props.fileSize).format('0.[0] b');
  const nameAndSize = props.fileName + ' (' + formattedFileSize + ')';

  const removeAttachment = () => props.removeAttachment(props.id);

  return (
    <div className="attachment">
      <a href={props.url} title={nameAndSize} target="_blank" rel="noopener">
        <Icon name="file"/>
        <span>{nameAndSize}</span>
      </a>

      {props.isEditing ? (
        <i className="remove-attachment" title="Remove file" onClick={removeAttachment}>
          <Icon name="times"/>
        </i>
      ) : false}
    </div>
  );
};<commit_msg>svg-icons: Fix element name in PostAttachmentGeneral<commit_after>import React from 'react';
import numeral from 'numeral';

import Icon from "./icon";

export default (props) => {
  const formattedFileSize = numeral(props.fileSize).format('0.[0] b');
  const nameAndSize = props.fileName + ' (' + formattedFileSize + ')';

  const removeAttachment = () => props.removeAttachment(props.id);

  return (
    <div className="attachment">
      <a href={props.url} title={nameAndSize} target="_blank" rel="noopener">
        <Icon name="file"/>
        <span>{nameAndSize}</span>
      </a>

      {props.isEditing ? (
        <span className="remove-attachment" title="Remove file" onClick={removeAttachment}>
          <Icon name="times"/>
        </span>
      ) : false}
    </div>
  );
};
{'fraction_non_alphanumeric': 0.16547231270358306, 'fraction_numerical': 0.0026058631921824105, 'mean_word_length': 3.3267605633802817, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 27, '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': '1080861', 'n_tokens_mistral': 463, 'n_tokens_neox': 459, 'n_words': 103}