<commit_before>class OptionTag < FieldTag

  def initialize(tag_name, markup, tokens)
    super(tag_name, markup, tokens)
  end

  private

  def html_attributes
    @option_text = @attributes.delete('text')
    html_attributes = super
    if @context['select_value'].to_s == parse_attribute(@attributes['value']).to_s
      html_attributes += render_attribute('selected', 'selected')
    end
    html_attributes
  end

  def field_html
    rvalue = "<option#{html_attributes}>"
    rvalue += html_escape(parse_attribute(@option_text))
    rvalue += "</option>"
    rvalue
  end

  # tidy up: no need for id or name in label
  def parse_id; end
  def parse_name; end

end
Liquid::Template.register_tag('option', OptionTag)<commit_msg>clean up the option_text call<commit_after>class OptionTag < FieldTag

  def initialize(tag_name, markup, tokens)
    super(tag_name, markup, tokens)
  end

  private

  def html_attributes
    html_attributes = super
    if @context['select_value'].to_s == parse_attribute(@attributes['value']).to_s
      html_attributes += render_attribute('selected', 'selected')
    end
    html_attributes
  end

  def field_html
    option_text = html_escape(parse_attribute(@attributes.delete('text')))
    rvalue = "<option#{html_attributes}>"
    rvalue += option_text
    rvalue += "</option>"
    rvalue
  end

  # tidy up: no need for id or name in label
  def parse_id; end
  def parse_name; end

end
Liquid::Template.register_tag('option', OptionTag)
{'fraction_non_alphanumeric': 0.10661268556005399, 'fraction_numerical': 0.0, 'mean_word_length': 4.167247386759582, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, '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': '6852926', 'n_tokens_mistral': 469, 'n_tokens_neox': 453, 'n_words': 115}