Sha256: b9cbd06c36996b57054a35c24117a1258a64ce49862fa0ea7c5fd50d253080d4

Contents?: true

Size: 263 Bytes

Versions: 4

Compression:

Stored size: 263 Bytes

Contents

# encoding: utf-8

module Nanoc::CLI::StreamCleaners
  # Removes ANSI color escape sequences.
  #
  # @api private
  class ANSIColors < Abstract
    # @see Nanoc::CLI::StreamCleaners::Abstract#clean
    def clean(s)
      s.gsub(/\e\[.+?m/, '')
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
nanoc-4.0.0b2 lib/nanoc/cli/stream_cleaners/ansi_colors.rb
nanoc-4.0.0b1 lib/nanoc/cli/stream_cleaners/ansi_colors.rb
nanoc-4.0.0a2 lib/nanoc/cli/stream_cleaners/ansi_colors.rb
nanoc-4.0.0a1 lib/nanoc/cli/stream_cleaners/ansi_colors.rb