diff options
Diffstat (limited to 'pygments/formatters/terminal256.py')
-rw-r--r-- | pygments/formatters/terminal256.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pygments/formatters/terminal256.py b/pygments/formatters/terminal256.py index 88bc23ce..7e9214bc 100644 --- a/pygments/formatters/terminal256.py +++ b/pygments/formatters/terminal256.py @@ -50,7 +50,7 @@ class EscapeSequence: attrs = [] if self.fg is not None: if self.fg in ansicolors: - esc = codes[self.fg[5:]] + esc = codes[self.fg.lstrip('ansi')] if ';01m' in esc: self.bold = True # extract fg color code. @@ -59,7 +59,7 @@ class EscapeSequence: attrs.extend(("38", "5", "%i" % self.fg)) if self.bg is not None: if self.bg in ansicolors: - esc = codes[self.bg[5:]] + esc = codes[self.bg.lstrip('ansi')] # extract fg color code, add 10 for bg. attrs.append(str(int(esc[2:4])+10)) else: |