<commit_before>import { color, Sans, Spacer } from "@artsy/palette"
import { Details_artwork } from "__generated__/Details_artwork.graphql"
import { ContextConsumer } from "Artsy"
import React from "react"
// @ts-ignore
import { ComponentRef, createFragmentContainer, graphql } from "react-relay"
import styled from "styled-components"
import TextLink from "../TextLink"

const TruncatedLine = styled.div`
  display: block;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
`

export interface Props extends React.HTMLProps<Details> {
  showSaleLine: boolean
  includeLinks: boolean
  artwork: Details_artwork
}

export class Details extends React.Component<Props, null> {
  static defaultProps = {
    showSaleLine: true,
    includeLinks: true,
  }

  artistLine() {
    const { cultural_maker, artists } = this.props.artwork
    const { includeLinks } = this.props

    if (cultural_maker) {
      return (
        <TruncatedLine>
          <strong>{cultural_maker}</strong>
        </TruncatedLine>
      )
    } else if (artists && artists.length) {
      const artistLine = artists
        .reduce((acc, artist, index) => {
          return acc.concat([
            ", ",
            includeLinks
              ? this.link(artist.name, artist.href, artist.__id + "-" + index)
              : artist.name,
          ])
        }, [])
        .slice(1)
      return (
        <TruncatedLine>
          <strong>{artistLine}</strong>
        </TruncatedLine>
      )
    }
  }

  titleLine() {
    return (
      <TruncatedLine>
        <TextLink href={this.props.artwork.href}>
          <em>{this.props.artwork.title}</em>
          {this.props.artwork.date && `, ${this.props.artwork.date}`}
        </TextLink>
      </TruncatedLine>
    )
  }

  line(text) {<commit_msg>[ArtworkBrick] BugFix: Remove all a tags in tombstone<commit_after>import { color, Sans, Spacer } from "@artsy/palette"
import { Details_artwork } from "__generated__/Details_artwork.graphql"
import { ContextConsumer } from "Artsy"
import React from "react"
// @ts-ignore
import { ComponentRef, createFragmentContainer, graphql } from "react-relay"
import styled from "styled-components"
import TextLink from "../TextLink"

const TruncatedLine = styled.div`
  display: block;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
`

export interface Props extends React.HTMLProps<Details> {
  showSaleLine: boolean
  includeLinks: boolean
  artwork: Details_artwork
}

export class Details extends React.Component<Props, null> {
  static defaultProps = {
    showSaleLine: true,
    includeLinks: true,
  }

  artistLine() {
    const { cultural_maker, artists } = this.props.artwork
    const { includeLinks } = this.props

    if (cultural_maker) {
      return (
        <TruncatedLine>
          <strong>{cultural_maker}</strong>
        </TruncatedLine>
      )
    } else if (artists && artists.length) {
      const artistLine = artists
        .reduce((acc, artist, index) => {
          return acc.concat([
            ", ",
            includeLinks
              ? this.link(artist.name, artist.href, artist.__id + "-" + index)
              : artist.name,
          ])
        }, [])
        .slice(1)
      return (
        <TruncatedLine>
          <strong>{artistLine}</strong>
        </TruncatedLine>
      )
    }
  }

  titleLine() {
    const { includeLinks } = this.props
    const artworkText = (
      <>
        <em>{this.props.artwork.title}</em>
        {this.props.artwork.date && `, ${this.props.artwork.date}`}
      </>
    )
    const artworkTextWithLink = includeLinks ? (
      <TextLink href={this.props.artwork.href}>{artworkText}</TextLink>
    ) : (
      artworkText
    )
    return <TruncatedLine>{artworkTextWithLink}</TruncatedLine>
  }

  line(text) {
{'fraction_non_alphanumeric': 0.12401471361008934, 'fraction_numerical': 0.0005254860746190226, 'mean_word_length': 2.5646067415730336, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 39, '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': '228632', 'n_tokens_mistral': 1182, 'n_tokens_neox': 1172, 'n_words': 244}