From a20eec253f7391475154e5d949b4f35ff524e3f6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Fri, 16 Mar 2012 15:40:49 +0000 Subject: [PATCH] Support strike ANSI escape codes. --- scripts/highlight.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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: -- 2.7.4