summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgbrandl <devnull@localhost>2007-02-15 19:40:08 +0100
committergbrandl <devnull@localhost>2007-02-15 19:40:08 +0100
commit3a469bbb741c9ab962661735706dd7de445f8126 (patch)
tree826c7a0125f67d4911d0d514feaf44c69657d2f7
parent04939d22e619ba996b9f05773594b305cf2b0534 (diff)
downloadpygments-3a469bbb741c9ab962661735706dd7de445f8126.tar.gz
[svn] Prepare for 0.7.1.
-rw-r--r--CHANGES11
-rw-r--r--docs/pygmentize.148
-rw-r--r--pygments/__init__.py2
-rw-r--r--pygments/cmdline.py2
-rw-r--r--pygments/formatters/html.py4
-rw-r--r--pygments/lexers/agile.py2
6 files changed, 46 insertions, 23 deletions
diff --git a/CHANGES b/CHANGES
index ba0345f1..9de5d5d9 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,10 +1,15 @@
Pygments changelog
==================
-Version 0.8 (in development)
-----------------------------
-(codename to be selected, released Apr XX, 2007)
+Version 0.7.1
+-------------
+(released Feb 15, 2007)
+
+- Fixed two highlighting bugs in the Python and Apache lexers.
+
+- Updated the included manpage.
+- Included a built version of the documentation in the source tarball.
Version 0.7
diff --git a/docs/pygmentize.1 b/docs/pygmentize.1
index 2c50c7b4..cd75b5fa 100644
--- a/docs/pygmentize.1
+++ b/docs/pygmentize.1
@@ -1,17 +1,24 @@
-.TH PYGMENTIZE 1 "October 30, 2006"
+.TH PYGMENTIZE 1 "February 15, 2007"
.SH NAME
pygmentize \- highlights the input file
.SH SYNOPSIS
.B \fBpygmentize\fP
-.RI [-l\ \fI<lexer>\fP]\ [-f\ \fI<formatter>\fP]\ [-O\ \fI<options>\fP]\ [-o\ \fI<outfile>\fP]\ [\fI<infile>\fP]
+.RI [-l\ \fI<lexer>\fP]\ [-F\ \fI<filter>\fP[:\fI<options>\fP]]\ [-f\ \fI<formatter>\fP]
+.RI [-O\ \fI<options>\fP]\ [-o\ \fI<outfile>\fP]\ [\fI<infile>\fP]
.br
.B \fBpygmentize\fP
.RI -S\ \fI<style>\fP\ -f\ \fI<formatter>\fP\ [-a\ \fI<arg>\fP]\ [-O\ \fI<options>\fP]
.br
.B \fBpygmentize\fP
-.RI -L\ |\ -h\ |\ -V
+.RI -L\ [\fI<which>\fP\ ...]
+.br
+.B \fBpygmentize\fP
+.RI -H\ \fI<type>\fP\ \fI<name>\fP
+.br
+.B \fBpygmentize\fP
+.RI -h\ |\ -V
.SH DESCRIPTION
Pygments is a generic syntax highlighter for general use in all kinds
@@ -32,36 +39,47 @@ write the result to \fI<outfile>\fP. If no \fI<infile>\fP is given, stdin is use
A summary of options is included below.
.TP
.B \-l \fI<lexer>\fP
-Set lexer name. If not given, the lexer is guessed from the extension of
-the input file name (this obviously doesn't work if the input is stdin).
+Set the lexer name. If not given, the lexer is guessed from the extension of the
+input file name (this obviously doesn't work if the input is stdin).
+.TP
+.B \-F \fI<filter>\fP[:\fI<options>\fP]
+Add a filter to the token stream. You can give options in the same way as for
+-O after a colon (note: there must not be spaces around the colon).
+This option can be given multiple times.
.TP
.B \-f \fI<formatter>\fP
-Set formatter name. If not given, it will be guessed from
-the extension of the output file name. If no output file is given,
-the terminal formatter will be used by default.
+Set the formatter name. If not given, it will be guessed from the extension of
+the output file name. If no output file is given, the terminal formatter will be
+used by default.
.TP
.B \-o \fI<outfile>\fP
Set output file. If not given, stdout is used.
.TP
.B \-O \fI<options>\fP
-With this option, you can give the lexer and formatter a comma-
-separated list of options, e.g. "-O bg=light,python=cool". Which options are
-valid for which lexers and formatters can be found in the documentation.
+With this option, you can give the lexer and formatter a comma-separated list of
+options, e.g. "-O bg=light,python=cool". Which options are valid for which
+lexers and formatters can be found in the documentation.
+This option can be given multiple times.
.TP
.B \-S \fI<style>\fP
-Print out style definitions for style <style> and for formatter <formatter>.
+Print out style definitions for style \fI<style>\fP and for formatter \fI<formatter>\fP.
The meaning of the argument given by
.B \-a \fI<arg>\fP
is formatter dependent and can be found in the documentation.
.TP
-.B \-L
-List all available lexers and formatters.
+.B \-L [\fI<which>\fP ...]
+List lexers, formatters, styles or filters. Set \fI<which>\fP to the thing you want
+to list (e.g. "styles"), or omit it to list everything.
+.TP
+.B \-H \fI<type>\fP \fI<name>\fP
+Print detailed help for the object \fI<name>\fP of type \fI<type>\fP, where \fI<type>\fP is one
+of "lexer", "formatter" or "filter".
.TP
.B \-h
Show help screen.
.TP
.B \-V
-Show version of the program.
+Show version of the Pygments package.
.SH SEE ALSO
/usr/share/doc/python-pygments/index.html
.SH AUTHOR
diff --git a/pygments/__init__.py b/pygments/__init__.py
index 55eced1f..42866722 100644
--- a/pygments/__init__.py
+++ b/pygments/__init__.py
@@ -23,7 +23,7 @@
:license: BSD, see LICENSE for more details.
"""
-__version__ = '0.8'
+__version__ = '0.7.1'
__author__ = 'Georg Brandl <g.brandl@gmx.net>'
__url__ = 'http://pygments.org/'
__license__ = 'BSD License'
diff --git a/pygments/cmdline.py b/pygments/cmdline.py
index 84c09b88..26586ec5 100644
--- a/pygments/cmdline.py
+++ b/pygments/cmdline.py
@@ -24,7 +24,7 @@ from pygments.styles import get_all_styles, get_style_by_name
USAGE = """\
-Usage: %s [-l <lexer>] [-F <filter>[:<options]] [-f <formatter>]
+Usage: %s [-l <lexer>] [-F <filter>[:<options>]] [-f <formatter>]
[-O <options>] [-o <outfile>] [<infile>]
%s -S <style> -f <formatter> [-a <arg>] [-O <options>]
diff --git a/pygments/formatters/html.py b/pygments/formatters/html.py
index 5acc858d..29d69708 100644
--- a/pygments/formatters/html.py
+++ b/pygments/formatters/html.py
@@ -341,7 +341,7 @@ class HtmlFormatter(Formatter):
text_style = ''
if Text in self.ttype2class:
text_style = ' ' + self.class2style[self.ttype2class[Text]][0]
- lines.insert(0, '%s{ background: %s;%s }' %
+ lines.insert(0, '%s { background: %s;%s }' %
(arg, self.style.background_color, text_style))
return '\n'.join(lines)
@@ -413,7 +413,7 @@ class HtmlFormatter(Formatter):
yield 0, '</td></tr></table>'
def _wrap_div(self, inner):
- yield 0, ('<div' + (self.cssclass and ' class="%s" ' % self.cssclass)
+ yield 0, ('<div' + (self.cssclass and ' class="%s"' % self.cssclass)
+ (self.cssstyles and ' style="%s"' % self.cssstyles) + '>')
for tup in inner:
yield tup
diff --git a/pygments/lexers/agile.py b/pygments/lexers/agile.py
index 1a1a26d3..08c9f13f 100644
--- a/pygments/lexers/agile.py
+++ b/pygments/lexers/agile.py
@@ -51,7 +51,7 @@ class PythonLexer(RegexLexer):
(r'\\\n', Text),
(r'\\', Text),
(r'(in|is|and|or|not)\b', Operator.Word),
- (r'!=|==|<<|>>|[-+/*%=<>&^|.]', Operator),
+ (r'!=|==|<<|>>|[-~+/*%=<>&^|.]', Operator),
(r'(assert|break|continue|del|elif|else|except|exec|'
r'finally|for|global|if|lambda|pass|print|raise|'
r'return|try|while|yield|as|with)\b', Keyword),