<commit_before># $Id$

module ActionView
  module Helpers
    module TagHelper
      def css_options_for_tag(name, options={})
        name = name.to_sym
        options.stringify_keys!
        if options.has_key? 'class'
          return options
        elsif name == :input and options['type']
          return options if (options['type'] == 'hidden')
          options['class'] = options['type'].dup
          options['class'] << ' button' if ['submit', 'reset'].include? options['type']
          options['class'] << ' text' if options['type'] == 'password'
        elsif name == :textarea
          options['class'] = 'text'
        end
        options
      end

      def tag_with_css(name, options=nil, open=false)
        tag_without_css(name, css_options_for_tag(name, options || {}), open)
      end
      alias_method_chain :tag, :css<commit_msg>TagHelper#css_options_for_tag: leave original options alone<commit_after># $Id$

module ActionView
  module Helpers
    module TagHelper
      def css_options_for_tag(name, options={})
        name = name.to_sym
        options = options.stringify_keys
        if options.has_key? 'class'
          return options
        elsif name == :input and options['type']
          return options if (options['type'] == 'hidden')
          options['class'] = options['type'].dup
          options['class'] << ' button' if ['submit', 'reset'].include? options['type']
          options['class'] << ' text' if options['type'] == 'password'
        elsif name == :textarea
          options['class'] = 'text'
        end
        options
      end

      def tag_with_css(name, options=nil, open=false)
        tag_without_css(name, css_options_for_tag(name, options || {}), open)
      end
      alias_method_chain :tag, :css
{'fraction_non_alphanumeric': 0.12987012987012986, 'fraction_numerical': 0.0, 'mean_word_length': 2.623721881390593, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 3, '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': '6306873', 'n_tokens_mistral': 507, 'n_tokens_neox': 503, 'n_words': 128}