<commit_before>module BlockHelper

  def block_title(title)
    tag_class = 'block-title'
    tag_class += ' empty' if title.empty?
    content_tag 'h3', content_tag('span', h(title)), :class => tag_class
  end

  def highlights_block_config_image_fields(block, image={}, row_number=nil)
    "
    <tr class=\"image-data-line\" data-row-number='#{row_number}'>
      <td>
        #{select_tag 'block[images][][image_id]', content_tag(:option) + option_groups_from_collection_for_select(block.folder_choices, :images, :name, :id, :name, image[:image_id].to_i).html_safe}
      </td>
      <td>#{text_field_tag 'block[images][][address]', image[:address], :class => 'highlight-address', :size => 20}</td>
      <td>#{text_field_tag 'block[images][][position]', image[:position], :class => 'highlight-position', :size => 1}</td>
    </tr><tr class=\"image-title\" data-row-number='#{row_number}'>
      <td colspan=\"3\"><label>#{
        content_tag('span', _('Title')) +
        text_field_tag('block[images][][title]', image[:title], :class => 'highlight-title', :size => 45)
      }</label></td>
      <td>#{link_to '', '#', :class=>'button icon-button icon-delete delete-highlight', :confirm=>_('Are you sure you want to remove this highlight')}</td>
    </tr>
    "
  end

end<commit_msg>Call button in standard way - by helper<commit_after>module BlockHelper

  def block_title(title)
    tag_class = 'block-title'
    tag_class += ' empty' if title.empty?
    content_tag 'h3', content_tag('span', h(title)), :class => tag_class
  end

  def highlights_block_config_image_fields(block, image={}, row_number=nil)
    "
    <tr class=\"image-data-line\" data-row-number='#{row_number}'>
      <td>
        #{select_tag 'block[images][][image_id]', content_tag(:option) + option_groups_from_collection_for_select(block.folder_choices, :images, :name, :id, :name, image[:image_id].to_i).html_safe}
      </td>
      <td>#{text_field_tag 'block[images][][address]', image[:address], :class => 'highlight-address', :size => 20}</td>
      <td>#{text_field_tag 'block[images][][position]', image[:position], :class => 'highlight-position', :size => 1}</td>
    </tr><tr class=\"image-title\" data-row-number='#{row_number}'>
      <td colspan=\"3\"><label>#{
        content_tag('span', _('Title')) +
        text_field_tag('block[images][][title]', image[:title], :class => 'highlight-title', :size => 45)
      }</label></td>
      <td>#{button_without_text (:delete, _('Remove'), '#', class: 'delete-highlight', :confirm=>_('Are you sure you want to remove this highlight'))}</td>
    </tr>
    "
    # for memory: link_to '', '#', :class=>'button icon-button icon-delete delete-highlight', :confirm=>_('Are you sure you want to remove this highlight')
  end

end
{'fraction_non_alphanumeric': 0.19971056439942114, 'fraction_numerical': 0.005065123010130246, 'mean_word_length': 4.486111111111111, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 54, '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': '3072184', 'n_tokens_mistral': 944, 'n_tokens_neox': 930, 'n_words': 181}