X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=scripts%2Fhighlight.py;h=9c12e821e77cc62bd823dd3e16e47f1617da7912;hb=a20eec253f7391475154e5d949b4f35ff524e3f6;hp=fa0e0ba89a2bbdd752450f8ebdb23fb02c97f526;hpb=bf34127d818fb7da8bb82921496c23f1746889f3;p=apitrace 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: