<commit_before><%

  # Read only fields.
  if @resource.typus_field_options_for(:read_only).to_s.include?(attribute)
    custom = { :readonly => 'readonly' }
    label_text << " <small>#{_t("Read only")}</small>"
  end

  # Auto generated fields.
  if @resource.typus_field_options_for(:auto_generated).include?(attribute)
    custom = { :auto_generated => true }
    label_text << " <small>#{_t("Auto generated")}</small>"
  end

  options.merge!(custom) if custom

%>

<li>
  <%= form.label attribute, label_text %>
  <%= form.text_field attribute, options %>
</li><commit_msg>Added raw to label to support HTML injected into readonly and auto-generated fields<commit_after><%

  # Read only fields.
  if @resource.typus_field_options_for(:read_only).to_s.include?(attribute)
    custom = { :readonly => 'readonly' }
    label_text << " <small>#{_t("Read only")}</small>"
  end

  # Auto generated fields.
  if @resource.typus_field_options_for(:auto_generated).include?(attribute)
    custom = { :auto_generated => true }
    label_text << " <small>#{_t("Auto generated")}</small>"
  end

  options.merge!(custom) if custom

%>

<li>
  <%= form.label attribute, raw(label_text) %>
  <%= form.text_field attribute, options %>
</li>
{'fraction_non_alphanumeric': 0.1630170316301703, 'fraction_numerical': 0.0, 'mean_word_length': 4.460176991150442, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 25, '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': '1999803', 'n_tokens_mistral': 420, 'n_tokens_neox': 408, 'n_words': 83}