<commit_before>module Mobile::PublicFilter
  extend ActiveSupport::Concern

  public
    def mobile_path?
      filters.include?(:mobile)
    end

  private
    def set_request_path_with_mobile
      return if @cur_path !~ /^#{SS.config.mobile.location}\//
      @cur_path.sub!(/^#{SS.config.mobile.location}\//, "/")
      filters << :mobile
    end

    def render_mobile
      body = response.body

      # links
      location = SS.config.mobile.location.gsub(/^\/|\/$/, "")
      body.gsub!(/href="\/(?!#{location}\/)/, "href=\"/#{location}/")
      body.gsub!(/<span .*?id="ss-(small|medium|large|kana|pc|mb)".*?>.*?<\/span>/, "")<commit_msg>fix: mobile fs link #192<commit_after>module Mobile::PublicFilter
  extend ActiveSupport::Concern

  public
    def mobile_path?
      filters.include?(:mobile)
    end

  private
    def set_request_path_with_mobile
      return if @cur_path !~ /^#{SS.config.mobile.location}\//
      @cur_path.sub!(/^#{SS.config.mobile.location}\//, "/")
      filters << :mobile
    end

    def render_mobile
      body = response.body

      # links
      location = SS.config.mobile.location.gsub(/^\/|\/$/, "")
      body.gsub!(/href="\/(?!#{location}\/)(?!fs\/)/, "href=\"/#{location}/")
      body.gsub!(/<span .*?id="ss-(small|medium|large|kana|pc|mb)".*?>.*?<\/span>/, "")
{'fraction_non_alphanumeric': 0.21444866920152092, 'fraction_numerical': 0.0022813688212927757, 'mean_word_length': 2.8144927536231883, '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': '5519180', 'n_tokens_mistral': 461, 'n_tokens_neox': 452, 'n_words': 66}