From db1e5ef0852069e7a471e990e6024fdf1b9b8a61 Mon Sep 17 00:00:00 2001 From: Alexei Sholik Date: Thu, 5 Jun 2014 04:07:19 +0300 Subject: Update ElixirLexer and example_elixir.ex Elixir syntax has evolved quite significantly since the initial lexer was written. In this update I have rewritten most of the code to support modern Elixir (as of v0.14.0-dev). The example file has also been updated to give an quick overview of most of the language constructs. --- pygments/styles/perldoc.py | 69 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 pygments/styles/perldoc.py (limited to 'pygments/styles/perldoc.py') diff --git a/pygments/styles/perldoc.py b/pygments/styles/perldoc.py new file mode 100644 index 00000000..9103c402 --- /dev/null +++ b/pygments/styles/perldoc.py @@ -0,0 +1,69 @@ +# -*- coding: utf-8 -*- +""" + pygments.styles.perldoc + ~~~~~~~~~~~~~~~~~~~~~~~ + + Style similar to the style used in the `perldoc`_ code blocks. + + .. _perldoc: http://perldoc.perl.org/ + + :copyright: Copyright 2006-2014 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, Generic, Whitespace + + +class PerldocStyle(Style): + """ + Style similar to the style used in the perldoc code blocks. + """ + + background_color = '#eeeedd' + default_style = '' + + styles = { + Whitespace: '#bbbbbb', + Comment: '#228B22', + Comment.Preproc: '#1e889b', + Comment.Special: '#8B008B bold', + + String: '#CD5555', + String.Heredoc: '#1c7e71 italic', + String.Regex: '#B452CD', + String.Other: '#cb6c20', + String.Regex: '#1c7e71', + + Number: '#B452CD', + + Operator.Word: '#8B008B', + + Keyword: '#8B008B bold', + Keyword.Type: '#a7a7a7', + + Name.Class: '#008b45 bold', + Name.Exception: '#008b45 bold', + Name.Function: '#008b45', + Name.Namespace: '#008b45 underline', + Name.Variable: '#00688B', + Name.Constant: '#00688B', + Name.Decorator: '#707a7c', + Name.Tag: '#8B008B bold', + Name.Attribute: '#658b00', + Name.Builtin: '#658b00', + + Generic.Heading: 'bold #000080', + Generic.Subheading: 'bold #800080', + Generic.Deleted: '#aa0000', + Generic.Inserted: '#00aa00', + Generic.Error: '#aa0000', + Generic.Emph: 'italic', + Generic.Strong: 'bold', + Generic.Prompt: '#555555', + Generic.Output: '#888888', + Generic.Traceback: '#aa0000', + + Error: 'bg:#e3d2d2 #a61717' + } -- cgit v1.2.1 From 89240ed7d7807346291eb20625a17441f6900157 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Wed, 21 Jan 2015 08:33:25 +0100 Subject: Copyright year update. --- pygments/styles/perldoc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pygments/styles/perldoc.py') diff --git a/pygments/styles/perldoc.py b/pygments/styles/perldoc.py index 9103c402..47a097ca 100644 --- a/pygments/styles/perldoc.py +++ b/pygments/styles/perldoc.py @@ -7,7 +7,7 @@ .. _perldoc: http://perldoc.perl.org/ - :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ -- cgit v1.2.1 From d4f16e413729248717f37907767eeded73963971 Mon Sep 17 00:00:00 2001 From: alaska Date: Tue, 26 Jan 2016 20:20:26 -0500 Subject: Change Keyword Type highlighting to use color #00688B, like perldoc.org's highlighting of scalars and arrays (fixes #1202) --- pygments/styles/perldoc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pygments/styles/perldoc.py') diff --git a/pygments/styles/perldoc.py b/pygments/styles/perldoc.py index 47a097ca..eae6170d 100644 --- a/pygments/styles/perldoc.py +++ b/pygments/styles/perldoc.py @@ -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', -- cgit v1.2.1