Sha256: 72218948408523d14c87d6a38b55e9dda632591a98050cf580cc0438942532b4

Contents?: true

Size: 393 Bytes

Versions: 11

Compression:

Stored size: 393 Bytes

Contents

module Nanoc::CLI::StreamCleaners
  # Simplifies output by replacing UTF-8 characters with their ASCII decompositions.
  #
  # @api private
  class UTF8 < Abstract
    # @see Nanoc::CLI::StreamCleaners::Abstract#clean
    def clean(s)
      # FIXME: this decomposition is not generally usable
      s.tr('─┼“”‘’', '-+""\'\'').gsub('…', '...').gsub('©', '(c)')
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
nanoc-4.7.9 lib/nanoc/cli/stream_cleaners/utf8.rb
nanoc-4.7.8 lib/nanoc/cli/stream_cleaners/utf8.rb
nanoc-4.7.7 lib/nanoc/cli/stream_cleaners/utf8.rb
nanoc-4.7.6 lib/nanoc/cli/stream_cleaners/utf8.rb
nanoc-4.7.5 lib/nanoc/cli/stream_cleaners/utf8.rb
nanoc-4.7.4 lib/nanoc/cli/stream_cleaners/utf8.rb
nanoc-4.7.3 lib/nanoc/cli/stream_cleaners/utf8.rb
nanoc-4.7.2 lib/nanoc/cli/stream_cleaners/utf8.rb
nanoc-4.7.1 lib/nanoc/cli/stream_cleaners/utf8.rb
nanoc-4.7.0 lib/nanoc/cli/stream_cleaners/utf8.rb
nanoc-4.6.4 lib/nanoc/cli/stream_cleaners/utf8.rb