Исправлена обработка цвета в терминале

master3.4 3.3.3.2
Mike Hiretsky 9 years ago
parent 4e442713f8
commit 6791ff6a04

@ -139,9 +139,9 @@ class ConsoleCodesConverter(BaseConverter):
background = self.ColorElement(begin=cci.BACKGROUND,
end=cci.BACKGROUND_END,
action=self.output.setBackground)
newline = element(lambda code: "\r" in code or "\n" in code,
newline = element(lambda code: type(code) != int and ("\r" in code or "\n" in code),
self.output.newLine)
tab = element(lambda code: "\t" in code, self.output.tab)
tab = element(lambda code: type(code) != int and "\t" in code, self.output.tab)
self.grams = [reset, bold, halfbright, underline, nounderline, normal,
invert, noinvert, reset_foreground, reset_background,
foreground, background, tab, newline]

Loading…
Cancel
Save