Sha256: 2074a3813350b937aca83b6fc95413bc3d9eddacd4836d50f7660c9376360d59
Contents?: true
Size: 673 Bytes
Versions: 8
Compression:
Stored size: 673 Bytes
Contents
# coding: utf-8 =begin Each of the following characters has a different unicode values: ⋅··∙・• Some are supported on galakei, but others aren't. The correct version will be used. =end class Galakei::Filter::NonStandardChar < Galakei::Filter::Base # :stopdoc: def condition? html_content_type? && (response.charset || Rails.application.config.encoding).downcase == "utf-8" end def filter body = response.body full_dot = "\u30FB" body.gsub!(/·|・|\u00B7|·|·|・/, full_dot) half_dot = "\uFF65" body.gsub!(/・|⋅|⋅|⋅|・|\u22C5/, half_dot) response.body = body end end
Version data entries
8 entries across 8 versions & 1 rubygems