Sha256: b8fc230e69eeaddbe71e066adfc69ded09a7379ed403631d1badf369888a008b

Contents?: true

Size: 400 Bytes

Versions: 24

Compression:

Stored size: 400 Bytes

Contents

# encoding: utf-8

module Nanoc::CLI::StreamCleaners

  # Simplifies output by replacing UTF-8 characters with their ASCII decompositions.
  class UTF8 < Abstract

    # @see Nanoc::CLI::StreamCleaners::Abstract#clean
    def clean(s)
      # FIXME this decomposition is not generally usable
      s.gsub(/“|”/, '"').gsub(/‘|’/, '\'').gsub('…', '...').gsub('©', '(c)')
    end

  end

end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
nanoc-3.7.4 lib/nanoc/cli/stream_cleaners/utf8.rb
nanoc-3.7.3 lib/nanoc/cli/stream_cleaners/utf8.rb
nanoc-3.7.2 lib/nanoc/cli/stream_cleaners/utf8.rb
nanoc-3.7.1 lib/nanoc/cli/stream_cleaners/utf8.rb
nanoc-3.7.0 lib/nanoc/cli/stream_cleaners/utf8.rb
nanoc-3.6.11 lib/nanoc/cli/stream_cleaners/utf8.rb
nanoc-3.6.10 lib/nanoc/cli/stream_cleaners/utf8.rb
nanoc-3.6.9 lib/nanoc/cli/stream_cleaners/utf8.rb
nanoc-3.6.8 lib/nanoc/cli/stream_cleaners/utf8.rb
nanoc-3.6.7 lib/nanoc/cli/stream_cleaners/utf8.rb
nanoc-3.6.6 lib/nanoc/cli/stream_cleaners/utf8.rb
nanoc-3.6.5 lib/nanoc/cli/stream_cleaners/utf8.rb
nanoc-3.6.4 lib/nanoc/cli/stream_cleaners/utf8.rb
nanoc-3.6.3 lib/nanoc/cli/stream_cleaners/utf8.rb
nanoc-3.6.2 lib/nanoc/cli/stream_cleaners/utf8.rb
nanoc-3.6.1 lib/nanoc/cli/stream_cleaners/utf8.rb
nanoc-3.6.0 lib/nanoc/cli/stream_cleaners/utf8.rb
nanoc-3.5.0 lib/nanoc/cli/stream_cleaners/utf8.rb
nanoc-3.5.0b2 lib/nanoc/cli/stream_cleaners/utf8.rb
nanoc-3.5.0b1 lib/nanoc/cli/stream_cleaners/utf8.rb