<commit_before>module HtmlHelpers
  include ERB::Util
  
  def path_for(default_path, path)
    if path.include?("/")
      path
    else
      default_path(path)
    end
  end
    
protected  
  def resource_url(filename)
    "file://#{ENV['TM_BUNDLE_SUPPORT']}/resource/#{filename}"
  end
  
  def select_box(name, select_options = [], options = {})
    options[:name] ||= name
    options[:id] ||= name
    # puts select_options.inspect
    <<-EOF
      <select name='#{options[:name]}' id='#{options[:id]}' onchange="#{options[:onchange]}" style='width:100%'>
        #{select_options}
      </select>
    EOF
  end
<commit_msg>Escape potential spaces in file URLs<commit_after>module HtmlHelpers
  include ERB::Util
  
  def path_for(default_path, path)
    if path.include?("/")
      path
    else
      default_path(path)
    end
  end
    
protected  
  def resource_url(filename)
    "file://" + e_url("#{ENV['TM_BUNDLE_SUPPORT']}/resource/#{filename}")
  end
  
  def select_box(name, select_options = [], options = {})
    options[:name] ||= name
    options[:id] ||= name
    # puts select_options.inspect
    <<-EOF
      <select name='#{options[:name]}' id='#{options[:id]}' onchange="#{options[:onchange]}" style='width:100%'>
        #{select_options}
      </select>
    EOF
  end

{'fraction_non_alphanumeric': 0.1624326404926867, 'fraction_numerical': 0.004618937644341801, 'mean_word_length': 3.220779220779221, 'pattern_counts': {'":': 0, '<': 11, '<?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': '5373273', 'n_tokens_mistral': 440, 'n_tokens_neox': 446, 'n_words': 84}