Browse Source

origin taint when _ detected

main
pvincent 3 months ago
parent
commit
5cd485d30c
  1. 13
      lib/semantic/ansi_formatter.rb

13
lib/semantic/ansi_formatter.rb

@ -125,13 +125,16 @@ module Semantic
log
end
def draw_fatal(char = CHAR_FATAL) = BG_MAGENTA + BOLD + TEXT_WHITE + char + CLEAR
def origin = colorize(centerize(log.name), TEXT_CYAN)
def build_prefix(char) = "#{tags} #{origin}#{colorize(char)}"
def build_terminus = "#{tags} #{origin} #{TERMINUS_STRING} "
def draw_fatal(char = CHAR_FATAL) = BG_MAGENTA + BOLD + TEXT_WHITE + char + CLEAR
def build_prefix(char) = "#{tags} #{origin}#{colorize(char)}"
def build_terminus = "#{tags} #{origin} #{TERMINUS_STRING} "
def centerize(text, max_length = CENTER_SIZE) = text.reverse.truncate(max_length).reverse.center(max_length)
def origin
taint = log.name.include?('_') ? TEXT_GRAY_400 : TEXT_CYAN
colorize(centerize(log.name), taint)
end
def stackisize(items)
return '' if items.empty?

Loading…
Cancel
Save