Class: Nanoc::CLI::StreamCleaners::UTF8
- Inherits:
-
Abstract
- Object
- Abstract
- Nanoc::CLI::StreamCleaners::UTF8
- Defined in:
- lib/nanoc/cli/stream_cleaners/utf8.rb
Overview
Simplifies output by replacing UTF-8 characters with their ASCII decompositions.
Instance Method Summary (collapse)
Instance Method Details
- (Object) clean(s)
7 8 9 10 |
# 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 |