fix: Terminal formatter was skipping things that it could highlight

This commit is contained in:
Roberto Alsina 2024-09-21 20:57:24 -03:00
parent 4432da2893
commit 3bf8172b89
2 changed files with 1 additions and 3 deletions

View File

@ -114,7 +114,7 @@ describe Tartrazine do
) )
else else
ansi.should eq( ansi.should eq(
"\e[38;2;171;70;66mputs\e[0m\e[38;2;216;216;216m \e[0m'Hello, World!'" "\e[38;2;171;70;66mputs\e[0m\e[38;2;216;216;216m \e[0m\e[38;2;161;181;108m'Hello, World!'\e[0m"
) )
end end
end end

View File

@ -34,8 +34,6 @@ module Tartrazine
end end
def colorize(text : String, token : String) : String def colorize(text : String, token : String) : String
style = theme.styles.fetch(token, nil)
return text if style.nil?
if theme.styles.has_key?(token) if theme.styles.has_key?(token)
s = theme.styles[token] s = theme.styles[token]
else else