Sha256: d17c487420a5211269b3323e39ba23913b72ad472a8bbcf2f491b52b5381f2ac
Contents?: true
Size: 397 Bytes
Versions: 2
Compression:
Stored size: 397 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
nanoc-3.8.0 | lib/nanoc/cli/stream_cleaners/utf8.rb |
nanoc-3.7.5 | lib/nanoc/cli/stream_cleaners/utf8.rb |