Module: GitLabBuildOutput::Ansi2html

Defined in:
lib/gitlab_build_output/ansi2html.rb

Defined Under Namespace

Classes: Converter

Constant Summary collapse

TRACE_SECTION_REGEX =
/section_((?:start)|(?:end)):(\d+):([^\r]+)\r\033\[0K/.freeze
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_build_output/ansi2html.rb', line 29

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