summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2012-02-05 09:32:37 +0100
committerGeorg Brandl <georg@python.org>2012-02-05 09:32:37 +0100
commitd026ccc8bccd09888604218613a4c45af5769f6f (patch)
tree185ca5aae7191e73a248c2e6fbb703958cfebcfc
parent5077c73cb8e07f0a851b39605e6d95d575ae1021 (diff)
downloadpygments-d026ccc8bccd09888604218613a4c45af5769f6f.tar.gz
Closes #727: add new "rrt" style.
-rw-r--r--CHANGES1
-rw-r--r--pygments/lexers/compiled.py1
-rw-r--r--pygments/styles/__init__.py1
-rw-r--r--pygments/styles/rrt.py34
4 files changed, 36 insertions, 1 deletions
diff --git a/CHANGES b/CHANGES
index 23f97acd..cf7dc6c7 100644
--- a/CHANGES
+++ b/CHANGES
@@ -65,6 +65,7 @@ Version 1.5
- Fix Boo string regexes (#679).
+- Add "rrt" style (#727).
Version 1.4
-----------
diff --git a/pygments/lexers/compiled.py b/pygments/lexers/compiled.py
index 6f4f12c4..f8f1b12a 100644
--- a/pygments/lexers/compiled.py
+++ b/pygments/lexers/compiled.py
@@ -2905,4 +2905,3 @@ class GosuTemplateLexer(Lexer):
stack = ['templateText']
for item in self.lexer.get_tokens_unprocessed(text, stack):
yield item
-
diff --git a/pygments/styles/__init__.py b/pygments/styles/__init__.py
index 15503f28..8597eedf 100644
--- a/pygments/styles/__init__.py
+++ b/pygments/styles/__init__.py
@@ -33,6 +33,7 @@ STYLE_MAP = {
'vim': 'vim::VimStyle',
'vs': 'vs::VisualStudioStyle',
'tango': 'tango::TangoStyle',
+ 'rrt': 'rrt::RrtStyle',
}
diff --git a/pygments/styles/rrt.py b/pygments/styles/rrt.py
new file mode 100644
index 00000000..a24d1a28
--- /dev/null
+++ b/pygments/styles/rrt.py
@@ -0,0 +1,34 @@
+# -*- coding: utf-8 -*-
+"""
+ pygments.styles.rrt
+ ~~~~~~~~~~~~~~~~~~~
+
+ pygments "rrt" theme, based on Zap and Emacs defaults.
+
+ :copyright: Copyright 2012 by the Pygments team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+
+from pygments.style import Style
+from pygments.token import Token, Comment, Name, Keyword, \
+ Generic, Number, String, Whitespace
+
+
+class RrtStyle(Style):
+ """
+ pygments "rrt" theme, based on Zap and Emacs defaults.
+ """
+
+ background_color = '#000000'
+ highlight_color = '#0000ff'
+
+ styles = {
+ Comment: '#00ff00',
+ Name.Function: '#ffff00',
+ Name.Variable: '#eedd82',
+ Name.Constant: '#7fffd4',
+ Keyword: '#ff0000',
+ Comment.Preproc: '#e5e5e5',
+ String: '#87ceeb',
+ Keyword.Type: '#ee82ee',
+ }