<commit_before>{View} = require 'atom'

module.exports =
class BlameLineView extends View

  @content: (params) ->
    if params.noCommit
      @div class: 'blame-line no-commit', =>
        @span class: 'text-subtle', '----------'
    else
      @div class: 'blame-line ' + params.backgroundClass, =>
        @span class: 'hash', params.hash.substring(0,8)
        @span class: 'date', params.date
        @span class: 'committer text-highlight', params.committer.split(' ').slice(-1)[0]<commit_msg>click handler stub and data attribute for hash of a blame line<commit_after>{View} = require 'atom'

module.exports =
class BlameLineView extends View

  @content: (params) ->
    if params.noCommit
      @div class: 'blame-line no-commit', =>
        @span class: 'text-subtle', '----------'
    else
      @div class: 'blame-line ' + params.backgroundClass, =>
        @a 'data-hash': params.hash, class: 'hash', click: 'hashClicked', params.hash.substring(0,8)
        @span class: 'date', params.date
        @span class: 'committer text-highlight', params.committer.split(' ').slice(-1)[0]


  hashClicked: (event, element) ->
    console.log(element.data('hash'));
{'fraction_non_alphanumeric': 0.1717948717948718, 'fraction_numerical': 0.006837606837606838, 'mean_word_length': 3.0659722222222223, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, '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': '5915362', 'n_tokens_mistral': 369, 'n_tokens_neox': 364, 'n_words': 94}