Fix bug where a colours would override underline

This commit is contained in:
Heinz N. Gies 2015-09-22 18:41:28 +02:00
parent fb16185ba7
commit 59f47d731f

View file

@ -90,7 +90,7 @@ format(Fmt) ->
-define(R, "\033[0m"). -define(R, "\033[0m").
-define(CFMT(Char, Colour), -define(CFMT(Char, Colour),
cfmt_([$~, $!, Char | S], Enabled) -> [Colour | cfmt_(S, Enabled)]; cfmt_([$~, $!, Char | S], Enabled) -> [Colour | cfmt_(S, Enabled)];
cfmt_([$~, $!, $_, Char | S], Enabled) -> [?U, Colour | cfmt_(S, Enabled)]). cfmt_([$~, $!, $_, Char | S], Enabled) -> [Colour, ?U | cfmt_(S, Enabled)]).
-define(CFMT_BG(Char, Colour), -define(CFMT_BG(Char, Colour),
cfmt_([$~, $#, Char | S], Enabled) -> [Colour | cfmt_(S, Enabled)]). cfmt_([$~, $#, Char | S], Enabled) -> [Colour | cfmt_(S, Enabled)]).
-define(CFMT_U(Char, Colour), -define(CFMT_U(Char, Colour),