From: José Fonseca Date: Fri, 16 Mar 2012 15:40:49 +0000 (+0000) Subject: Support strike ANSI escape codes. X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=a20eec253f7391475154e5d949b4f35ff524e3f6;p=apitrace Support strike ANSI escape codes. --- diff --git a/scripts/highlight.py b/scripts/highlight.py index fa0e0ba..9c12e82 100644 --- a/scripts/highlight.py +++ b/scripts/highlight.py @@ -57,7 +57,10 @@ class PlainHighlighter: def color(self, color): pass - def bold(self, enable): + def bold(self, enable = True): + pass + + def strike(self): pass def italic(self): @@ -102,6 +105,9 @@ class AnsiHighlighter(PlainHighlighter): else: self._escape('21m') + def strike(self): + self._escape('9m') + def italic(self): self._escape(self._italic) @@ -175,7 +181,7 @@ class WindowsConsoleHighlighter(PlainHighlighter): intensity = self._attribute & self.FOREGROUND_INTENSITY self._setAttribute(color | intensity) - def bold(self, enable): + def bold(self, enable = True): if enable: attribute = self._attribute | self.FOREGROUND_INTENSITY else: