diff options
| author | Matthias Bussonnier <bussonniermatthias@gmail.com> | 2016-02-12 14:30:03 -0800 |
|---|---|---|
| committer | Matthias Bussonnier <bussonniermatthias@gmail.com> | 2016-02-12 14:30:03 -0800 |
| commit | f8b8016d0543fe9b6bbb618c04d988a8926daa11 (patch) | |
| tree | 89fecdeddc03a9ac507c051985caab145f2ea5d8 /pygments/formatters/html.py | |
| parent | 3516325f4e3227db16cd8278efaa03233025d6f4 (diff) | |
| download | pygments-git-f8b8016d0543fe9b6bbb618c04d988a8926daa11.tar.gz | |
Update to leave compatibility for other formatters.
Diffstat (limited to 'pygments/formatters/html.py')
| -rw-r--r-- | pygments/formatters/html.py | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/pygments/formatters/html.py b/pygments/formatters/html.py index 38e49f15..b03a4bd5 100644 --- a/pygments/formatters/html.py +++ b/pygments/formatters/html.py @@ -20,23 +20,6 @@ from pygments.token import Token, Text, STANDARD_TYPES from pygments.util import get_bool_opt, get_int_opt, get_list_opt, \ StringIO, string_types, iteritems - -_deansify_map = { - '#darkyellow':'#brown', - '#darkteal': '#turquoise', - '#fusia': '#fushia' -} - - - -def _deansify(color): - if color.startswith('#ansi'): - color = color[5:] - else: - color = '#%s'% color - - return _deansify_map.get(color, color) - try: import ctags except ImportError: @@ -461,7 +444,7 @@ class HtmlFormatter(Formatter): name = self._get_css_class(ttype) style = '' if ndef['color']: - style += 'color: %s; ' % _deansify(ndef['color']) + style += 'color: #%s; ' % ndef['color'] if ndef['bold']: style += 'font-weight: bold; ' if ndef['italic']: @@ -469,7 +452,7 @@ class HtmlFormatter(Formatter): if ndef['underline']: style += 'text-decoration: underline; ' if ndef['bgcolor']: - style += 'background-color: %s; ' % _deansify(ndef['bgcolor']) + style += 'background-color: #%s; ' % ndef['bgcolor'] if ndef['border']: style += 'border: 1px solid #%s; ' % ndef['border'] if style: |
