class Nanoc::CLI::StreamCleaners::UTF8

Simplifies output by replacing UTF-8 characters with their ASCII decompositions.

@api private

Public Instance Methods

clean(s) click to toggle source

@see Nanoc::CLI::StreamCleaners::Abstract#clean

# File lib/nanoc/cli/stream_cleaners/utf8.rb, line 7
def clean(s)
  # FIXME: this decomposition is not generally usable
  s.gsub(/“|”/, '"').gsub(/‘|’/, '\').gsub('…', '...').gsub('©', '(c)')
end