Sha256: 5f462838ce9aab6021dd8a99e64e1612b866d2a80bd9ffdd164992aaab12cdbe

Contents?: true

Size: 395 Bytes

Versions: 5

Compression:

Stored size: 395 Bytes

Contents

require 'opal-replutils'

module RSpec
  module Core
    module Formatters
      # @private
      # Provides terminal syntax highlighting of code snippets
      # when coderay is available.
      class SyntaxHighlighter
        # A poor-man highlighter
        def highlight(lines)
          REPLUtils::ColorPrinter.colorize(lines.join("\n")).split("\n")
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
opal-rspec-1.1.0.alpha3 lib-opal/opal/rspec/fixes/rspec/core/formatters/syntax_highlighter.rb
opal-rspec-1.1.0.alpha2 lib-opal/opal/rspec/fixes/rspec/core/formatters/syntax_highlighter.rb
opal-rspec-1.1.0.alpha1 lib-opal/opal/rspec/fixes/rspec/core/formatters/syntax_highlighter.rb
opal-rspec-1.0.0 lib-opal/opal/rspec/fixes/rspec/core/formatters/syntax_highlighter.rb
opal-rspec-1.0.0.alpha1 lib-opal/opal/rspec/fixes/rspec/core/formatters/syntax_highlighter.rb