Skip to content
Snippets Groups Projects
Commit 2cc2648f authored by elijah's avatar elijah
Browse files

bugfix: better coloring of log lines that wrap

parent 174dbf38
Branches
Tags
No related merge requests found
...@@ -211,7 +211,13 @@ module LeapCli ...@@ -211,7 +211,13 @@ module LeapCli
if style if style
codes << EFFECTS[style] || EFFECTS[:nothing] codes << EFFECTS[style] || EFFECTS[:nothing]
end end
if str.is_a?(String)
["\033[%sm" % codes.join(';'), str, NO_COLOR].join ["\033[%sm" % codes.join(';'), str, NO_COLOR].join
elsif str.is_a?(Array)
str.map { |s|
["\033[%sm" % codes.join(';'), s, NO_COLOR].join
}
end
end end
private private
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment