Back to index

moin  1.9.0~rc2
perldoc.py
Go to the documentation of this file.
00001 # -*- coding: utf-8 -*-
00002 """
00003     pygments.styles.perldoc
00004     ~~~~~~~~~~~~~~~~~~~~~~~
00005 
00006     Style similar to the style used in the `perldoc`_ code blocks.
00007 
00008     .. _perldoc: http://perldoc.perl.org/
00009 
00010     :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
00011     :license: BSD, see LICENSE for details.
00012 """
00013 
00014 from pygments.style import Style
00015 from pygments.token import Keyword, Name, Comment, String, Error, \
00016      Number, Operator, Generic, Whitespace
00017 
00018 
00019 class PerldocStyle(Style):
00020     """
00021     Style similar to the style used in the perldoc code blocks.
00022     """
00023 
00024     background_color = '#eeeedd'
00025     default_style = ''
00026 
00027     styles = {
00028         Whitespace:             '#bbbbbb',
00029         Comment:                '#228B22',
00030         Comment.Preproc:        '#1e889b',
00031         Comment.Special:        '#8B008B bold',
00032 
00033         String:                 '#CD5555',
00034         String.Heredoc:         '#1c7e71 italic',
00035         String.Regex:           '#B452CD',
00036         String.Other:           '#cb6c20',
00037         String.Regex:           '#1c7e71',
00038 
00039         Number:                 '#B452CD',
00040 
00041         Operator.Word:          '#8B008B',
00042 
00043         Keyword:                '#8B008B bold',
00044         Keyword.Type:           '#a7a7a7',
00045 
00046         Name.Class:             '#008b45 bold',
00047         Name.Exception:         '#008b45 bold',
00048         Name.Function:          '#008b45',
00049         Name.Namespace:         '#008b45 underline',
00050         Name.Variable:          '#00688B',
00051         Name.Constant:          '#00688B',
00052         Name.Decorator:         '#707a7c',
00053         Name.Tag:               '#8B008B bold',
00054         Name.Attribute:         '#658b00',
00055         Name.Builtin:           '#658b00',
00056 
00057         Generic.Heading:        'bold #000080',
00058         Generic.Subheading:     'bold #800080',
00059         Generic.Deleted:        '#aa0000',
00060         Generic.Inserted:       '#00aa00',
00061         Generic.Error:          '#aa0000',
00062         Generic.Emph:           'italic',
00063         Generic.Strong:         'bold',
00064         Generic.Prompt:         '#555555',
00065         Generic.Output:         '#888888',
00066         Generic.Traceback:      '#aa0000',
00067 
00068         Error:                  'bg:#e3d2d2 #a61717'
00069     }