Module: Gitlab::Ci::Ansi2html

Defined in:
lib/gitlab/ci/ansi2html.rb

Defined Under Namespace

Classes: Converter, Result

Constant Summary collapse

COLOR =

keys represent the trailing digit in color changing command (30-37, 40-47, 90-97. 100-107)

{
  0 => 'black', # not that this is gray in the intense color table
  1 => 'red',
  2 => 'green',
  3 => 'yellow',
  4 => 'blue',
  5 => 'magenta',
  6 => 'cyan',
  7 => 'white' # not that this is gray in the dark (aka default) color table
}.freeze
STYLE_SWITCHES =
{
  bold: 0x01,
  italic: 0x02,
  underline: 0x04,
  conceal: 0x08,
  cross: 0x10
}.freeze

Class Method Summary collapse

Class Method Details

.convert(ansi, state = nil) ⇒ Object



29
30
31
# File 'lib/gitlab/ci/ansi2html.rb', line 29

def self.convert(ansi, state = nil)
  Converter.new.convert(ansi, state)
end