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)
9 10 11 12 |
# File 'lib/nanoc/cli/stream_cleaners/utf8.rb', line 9 def clean(s) # FIXME this decomposition is not generally usable s.gsub(/“|”/, '"').gsub(/‘|’/, '\'').gsub('…', '...').gsub('©', '(c)') end |