upgrade pygments to v2.2.0

This commit is contained in:
Alan Hamlett 2017-02-13 23:25:51 -08:00
parent e5ee05a14f
commit fd6f5779d4
204 changed files with 9566 additions and 2387 deletions

View file

@ -5,7 +5,7 @@
Contains built-in styles.
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
@ -41,6 +41,9 @@ STYLE_MAP = {
'lovelace': 'lovelace::LovelaceStyle',
'algol': 'algol::AlgolStyle',
'algol_nu': 'algol_nu::Algol_NuStyle',
'arduino': 'arduino::ArduinoStyle',
'rainbow_dash': 'rainbow_dash::RainbowDashStyle',
'abap': 'abap::AbapStyle',
}

View file

@ -0,0 +1,29 @@
# -*- coding: utf-8 -*-
"""
pygments.styles.abap
~~~~~~~~~~~~~~~~~~~~
ABAP workbench like style.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.style import Style
from pygments.token import Keyword, Name, Comment, String, Error, \
Number, Operator
class AbapStyle(Style):
default_style = ""
styles = {
Comment: 'italic #888',
Comment.Special: '#888',
Keyword: '#00f',
Operator.Word: '#00f',
Name: '#000',
Number: '#3af',
String: '#5a2',
Error: '#F00',
}

View file

@ -26,7 +26,7 @@
[1] `Revised Report on the Algorithmic Language Algol-60 <http://www.masswerk.at/algol60/report.htm>`
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""

View file

@ -26,7 +26,7 @@
[1] `Revised Report on the Algorithmic Language Algol-60 <http://www.masswerk.at/algol60/report.htm>`
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""

View file

@ -5,7 +5,7 @@
Arduino® Syntax highlighting style.
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
@ -29,7 +29,7 @@ class ArduinoStyle(Style):
Comment: "#95a5a6", # class: 'c'
Comment.Multiline: "", # class: 'cm'
Comment.Preproc: "#434f54", # class: 'cp'
Comment.Preproc: "#728E00", # class: 'cp'
Comment.Single: "", # class: 'c1'
Comment.Special: "", # class: 'cs'
@ -38,15 +38,15 @@ class ArduinoStyle(Style):
Keyword.Declaration: "", # class: 'kd'
Keyword.Namespace: "", # class: 'kn'
Keyword.Pseudo: "#00979D", # class: 'kp'
Keyword.Reserved: "", # class: 'kr'
Keyword.Reserved: "#00979D", # class: 'kr'
Keyword.Type: "#00979D", # class: 'kt'
Operator: "#434f54", # class: 'o'
Operator: "#728E00", # class: 'o'
Operator.Word: "", # class: 'ow'
Name: "#434f54", # class: 'n'
Name.Attribute: "", # class: 'na'
Name.Builtin: "", # class: 'nb'
Name.Builtin: "#728E00", # class: 'nb'
Name.Builtin.Pseudo: "", # class: 'bp'
Name.Class: "", # class: 'nc'
Name.Constant: "", # class: 'no'
@ -64,7 +64,7 @@ class ArduinoStyle(Style):
Name.Variable.Global: "", # class: 'vg'
Name.Variable.Instance: "", # class: 'vi'
Number: "#434f54", # class: 'm'
Number: "#8A7B52", # class: 'm'
Number.Float: "", # class: 'mf'
Number.Hex: "", # class: 'mh'
Number.Integer: "", # class: 'mi'

View file

@ -5,7 +5,7 @@
A colorful style, inspired by the terminal highlighting style.
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""

View file

@ -5,7 +5,7 @@
Style similar to the style used in the Borland IDEs.
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""

View file

@ -5,7 +5,7 @@
Simple black/white only style.
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""

View file

@ -5,7 +5,7 @@
A colorful style, inspired by CodeRay.
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""

View file

@ -5,7 +5,7 @@
The default highlighting style.
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""

View file

@ -5,7 +5,7 @@
A highlighting style for Pygments, inspired by Emacs.
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""

View file

@ -5,7 +5,7 @@
A modern style based on the VIM pyte theme.
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""

View file

@ -5,7 +5,7 @@
pygments version of my "fruity" vim theme.
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""

View file

@ -5,7 +5,7 @@
Igor Pro default style.
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""

View file

@ -9,7 +9,7 @@
A desaturated, somewhat subdued style created for the Lovelace interactive
learning environment.
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
@ -62,14 +62,18 @@ class LovelaceStyle(Style):
Name.Entity: _ESCAPE_LIME,
Name.Exception: _EXCEPT_YELLOW,
Name.Function: _FUN_BROWN,
Name.Function.Magic: _DOC_ORANGE,
Name.Label: _LABEL_CYAN,
Name.Namespace: _LABEL_CYAN,
Name.Tag: _KW_BLUE,
Name.Variable: '#b04040',
Name.Variable.Global:_EXCEPT_YELLOW,
Name.Variable.Magic: _DOC_ORANGE,
String: _STR_RED,
String.Affix: '#444444',
String.Char: _OW_PURPLE,
String.Delimiter: _DOC_ORANGE,
String.Doc: 'italic '+_DOC_ORANGE,
String.Escape: _ESCAPE_LIME,
String.Interpol: 'underline',

View file

@ -8,7 +8,7 @@
This is a port of the style used in the `php port`_ of pygments
by Manni. The style is called 'default' there.
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""

View file

@ -7,7 +7,7 @@
http://www.monokai.nl/blog/2006/07/15/textmate-color-theme/
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""

View file

@ -5,7 +5,7 @@
Murphy's style from CodeRay.
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""

View file

@ -5,7 +5,7 @@
pygments version of my "native" vim theme.
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""

View file

@ -9,7 +9,7 @@
Created with Base16 Builder by Chris Kempson
(https://github.com/chriskempson/base16-builder).
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""

View file

@ -9,7 +9,7 @@
Created with Base16 Builder by Chris Kempson
(https://github.com/chriskempson/base16-builder).
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""

View file

@ -7,7 +7,7 @@
.. _pastie: http://pastie.caboo.se/
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""

View file

@ -7,7 +7,7 @@
.. _perldoc: http://perldoc.perl.org/
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
@ -41,7 +41,7 @@ class PerldocStyle(Style):
Operator.Word: '#8B008B',
Keyword: '#8B008B bold',
Keyword.Type: '#a7a7a7',
Keyword.Type: '#00688B',
Name.Class: '#008b45 bold',
Name.Exception: '#008b45 bold',

View file

@ -0,0 +1,89 @@
# -*- coding: utf-8 -*-
"""
pygments.styles.rainbow_dash
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A bright and colorful syntax highlighting `theme`.
.. _theme: http://sanssecours.github.io/Rainbow-Dash.tmbundle
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.style import Style
from pygments.token import (Comment, Error, Generic, Name, Number, Operator,
String, Text, Whitespace, Keyword)
BLUE_LIGHT = '#0080ff'
BLUE = '#2c5dcd'
GREEN = '#00cc66'
GREEN_LIGHT = '#ccffcc'
GREEN_NEON = '#00cc00'
GREY = '#aaaaaa'
GREY_LIGHT = '#cbcbcb'
GREY_DARK = '#4d4d4d'
PURPLE = '#5918bb'
RED = '#cc0000'
RED_DARK = '#c5060b'
RED_LIGHT = '#ffcccc'
RED_BRIGHT = '#ff0000'
WHITE = '#ffffff'
TURQUOISE = '#318495'
ORANGE = '#ff8000'
class RainbowDashStyle(Style):
"""
A bright and colorful syntax highlighting theme.
"""
background_color = WHITE
styles = {
Comment: 'italic {}'.format(BLUE_LIGHT),
Comment.Preproc: 'noitalic',
Comment.Special: 'bold',
Error: 'bg:{} {}'.format(RED, WHITE),
Generic.Deleted: 'border:{} bg:{}'.format(RED_DARK, RED_LIGHT),
Generic.Emph: 'italic',
Generic.Error: RED_BRIGHT,
Generic.Heading: 'bold {}'.format(BLUE),
Generic.Inserted: 'border:{} bg:{}'.format(GREEN_NEON, GREEN_LIGHT),
Generic.Output: GREY,
Generic.Prompt: 'bold {}'.format(BLUE),
Generic.Strong: 'bold',
Generic.Subheading: 'bold {}'.format(BLUE),
Generic.Traceback: RED_DARK,
Keyword: 'bold {}'.format(BLUE),
Keyword.Pseudo: 'nobold',
Keyword.Type: PURPLE,
Name.Attribute: 'italic {}'.format(BLUE),
Name.Builtin: 'bold {}'.format(PURPLE),
Name.Class: 'underline',
Name.Constant: TURQUOISE,
Name.Decorator: 'bold {}'.format(ORANGE),
Name.Entity: 'bold {}'.format(PURPLE),
Name.Exception: 'bold {}'.format(PURPLE),
Name.Function: 'bold {}'.format(ORANGE),
Name.Tag: 'bold {}'.format(BLUE),
Number: 'bold {}'.format(PURPLE),
Operator: BLUE,
Operator.Word: 'bold',
String: GREEN,
String.Doc: 'italic',
String.Escape: 'bold {}'.format(RED_DARK),
String.Other: TURQUOISE,
String.Symbol: 'bold {}'.format(RED_DARK),
Text: GREY_DARK,
Whitespace: GREY_LIGHT
}

View file

@ -5,7 +5,7 @@
pygments "rrt" theme, based on Zap and Emacs defaults.
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""

View file

@ -0,0 +1,44 @@
# -*- coding: utf-8 -*-
"""
pygments.styles.sas
~~~~~~~~~~~~~~~~~~~
Style inspired by SAS' enhanced program editor. Note This is not
meant to be a complete style. It's merely meant to mimic SAS'
program editor syntax highlighting.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.style import Style
from pygments.token import Keyword, Name, Comment, String, Error, \
Number, Other, Whitespace, Generic
class SasStyle(Style):
"""
Style inspired by SAS' enhanced program editor. Note This is not
meant to be a complete style. It's merely meant to mimic SAS'
program editor syntax highlighting.
"""
default_style = ''
styles = {
Whitespace: '#bbbbbb',
Comment: 'italic #008800',
String: '#800080',
Number: 'bold #2e8b57',
Other: 'bg:#ffffe0',
Keyword: '#2c2cff',
Keyword.Reserved: 'bold #353580',
Keyword.Constant: 'bold',
Name.Builtin: '#2c2cff',
Name.Function: 'bold italic',
Name.Variable: 'bold #2c2cff',
Generic: '#2c2cff',
Generic.Emph: '#008800',
Generic.Error: '#d30202',
Error: 'bg:#e3d2d2 #a61717'
}

View file

@ -0,0 +1,40 @@
# -*- coding: utf-8 -*-
"""
pygments.styles.stata
~~~~~~~~~~~~~~~~~~~~~
Style inspired by Stata's do-file editor. Note this is not meant
to be a complete style. It's merely meant to mimic Stata's do file
editor syntax highlighting.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.style import Style
from pygments.token import Keyword, Name, Comment, String, Error, \
Number, Operator, Whitespace
class StataStyle(Style):
"""
Style inspired by Stata's do-file editor. Note this is not meant
to be a complete style. It's merely meant to mimic Stata's do file
editor syntax highlighting.
"""
default_style = ''
styles = {
Whitespace: '#bbbbbb',
Comment: 'italic #008800',
String: '#7a2424',
Number: '#2c2cff',
Operator: '',
Keyword: 'bold #353580',
Keyword.Constant: '',
Name.Function: '#2c2cff',
Name.Variable: 'bold #35baba',
Name.Variable.Global: 'bold #b5565e',
Error: 'bg:#e3d2d2 #a61717'
}

View file

@ -33,7 +33,7 @@
have been chosen to have the same style. Similarly, keywords (Keyword.*),
and Operator.Word (and, or, in) have been assigned the same style.
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""

View file

@ -5,7 +5,7 @@
Port of the default trac highlighter design.
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""

View file

@ -5,7 +5,7 @@
A highlighting style for Pygments, inspired by vim.
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""

View file

@ -5,7 +5,7 @@
Simple style with MS Visual Studio colors.
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""

View file

@ -5,7 +5,7 @@
Style similar to the `Xcode` default theme.
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""