changeset 5564:74fa6f714526

upgraded pygments to 1.2.2
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 21 Feb 2010 23:52:54 +0100
parents 69ffae200796
children 5c268aba6bc4
files MoinMoin/support/pygments/__init__.py MoinMoin/support/pygments/cmdline.py MoinMoin/support/pygments/console.py MoinMoin/support/pygments/filter.py MoinMoin/support/pygments/filters/__init__.py MoinMoin/support/pygments/formatter.py MoinMoin/support/pygments/formatters/__init__.py MoinMoin/support/pygments/formatters/_mapping.py MoinMoin/support/pygments/formatters/bbcode.py MoinMoin/support/pygments/formatters/html.py MoinMoin/support/pygments/formatters/img.py MoinMoin/support/pygments/formatters/latex.py MoinMoin/support/pygments/formatters/other.py MoinMoin/support/pygments/formatters/rtf.py MoinMoin/support/pygments/formatters/svg.py MoinMoin/support/pygments/formatters/terminal.py MoinMoin/support/pygments/formatters/terminal256.py MoinMoin/support/pygments/lexer.py MoinMoin/support/pygments/lexers/__init__.py MoinMoin/support/pygments/lexers/_clbuiltins.py MoinMoin/support/pygments/lexers/_luabuiltins.py MoinMoin/support/pygments/lexers/_mapping.py MoinMoin/support/pygments/lexers/_phpbuiltins.py MoinMoin/support/pygments/lexers/agile.py MoinMoin/support/pygments/lexers/asm.py MoinMoin/support/pygments/lexers/compiled.py MoinMoin/support/pygments/lexers/dotnet.py MoinMoin/support/pygments/lexers/functional.py MoinMoin/support/pygments/lexers/math.py MoinMoin/support/pygments/lexers/other.py MoinMoin/support/pygments/lexers/parsers.py MoinMoin/support/pygments/lexers/special.py MoinMoin/support/pygments/lexers/templates.py MoinMoin/support/pygments/lexers/text.py MoinMoin/support/pygments/lexers/web.py MoinMoin/support/pygments/plugin.py MoinMoin/support/pygments/scanner.py MoinMoin/support/pygments/style.py MoinMoin/support/pygments/styles/__init__.py MoinMoin/support/pygments/styles/autumn.py MoinMoin/support/pygments/styles/borland.py MoinMoin/support/pygments/styles/bw.py MoinMoin/support/pygments/styles/colorful.py MoinMoin/support/pygments/styles/default.py MoinMoin/support/pygments/styles/emacs.py MoinMoin/support/pygments/styles/friendly.py MoinMoin/support/pygments/styles/fruity.py MoinMoin/support/pygments/styles/manni.py MoinMoin/support/pygments/styles/murphy.py MoinMoin/support/pygments/styles/native.py MoinMoin/support/pygments/styles/pastie.py MoinMoin/support/pygments/styles/perldoc.py MoinMoin/support/pygments/styles/tango.py MoinMoin/support/pygments/styles/trac.py MoinMoin/support/pygments/styles/vim.py MoinMoin/support/pygments/styles/vs.py MoinMoin/support/pygments/token.py MoinMoin/support/pygments/unistring.py MoinMoin/support/pygments/util.py docs/3rd_party_support_code.txt
diffstat 60 files changed, 683 insertions(+), 215 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/support/pygments/__init__.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/__init__.py	Sun Feb 21 23:52:54 2010 +0100
@@ -12,7 +12,8 @@
     * a wide range of common languages and markup formats is supported
     * special attention is paid to details, increasing quality by a fair amount
     * support for new languages and formats are added easily
-    * a number of output formats, presently HTML, LaTeX, RTF, SVG and ANSI sequences
+    * a number of output formats, presently HTML, LaTeX, RTF, SVG, all image
+      formats that PIL supports, and ANSI sequences
     * it is usable as a command-line tool and as a library
     * ... and it highlights even Brainfuck!
 
@@ -21,11 +22,11 @@
     .. _Pygments tip:
        http://dev.pocoo.org/hg/pygments-main/archive/tip.tar.gz#egg=Pygments-dev
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
-__version__ = '1.1.1'
+__version__ = '1.2.2'
 __docformat__ = 'restructuredtext'
 
 __all__ = ['lex', 'format', 'highlight']
--- a/MoinMoin/support/pygments/cmdline.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/cmdline.py	Sun Feb 21 23:52:54 2010 +0100
@@ -5,7 +5,7 @@
 
     Command line interface.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 import sys
--- a/MoinMoin/support/pygments/console.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/console.py	Sun Feb 21 23:52:54 2010 +0100
@@ -5,7 +5,7 @@
 
     Format colored console output.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
--- a/MoinMoin/support/pygments/filter.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/filter.py	Sun Feb 21 23:52:54 2010 +0100
@@ -5,7 +5,7 @@
 
     Module that implements the default filter.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
--- a/MoinMoin/support/pygments/filters/__init__.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/filters/__init__.py	Sun Feb 21 23:52:54 2010 +0100
@@ -6,7 +6,7 @@
     Module containing filter lookup functions and default
     filters.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 try:
@@ -283,10 +283,78 @@
                 yield ttype, value
 
 
+class GobbleFilter(Filter):
+    """
+    Gobbles source code lines (eats initial characters).
+
+    This filter drops the first ``n`` characters off every line of code.  This
+    may be useful when the source code fed to the lexer is indented by a fixed
+    amount of space that isn't desired in the output.
+
+    Options accepted:
+
+    `n` : int
+       The number of characters to gobble.
+
+    *New in Pygments 1.2.*
+    """
+    def __init__(self, **options):
+        Filter.__init__(self, **options)
+        self.n = get_int_opt(options, 'n', 0)
+
+    def gobble(self, value, left):
+        if left < len(value):
+            return value[left:], 0
+        else:
+            return '', left - len(value)
+
+    def filter(self, lexer, stream):
+        n = self.n
+        left = n # How many characters left to gobble.
+        for ttype, value in stream:
+            # Remove ``left`` tokens from first line, ``n`` from all others.
+            parts = value.split('\n')
+            (parts[0], left) = self.gobble(parts[0], left)
+            for i in range(1, len(parts)):
+                (parts[i], left) = self.gobble(parts[i], n)
+            value = '\n'.join(parts)
+
+            if value != '':
+                yield ttype, value
+
+
+class TokenMergeFilter(Filter):
+    """
+    Merges consecutive tokens with the same token type in the output stream of a
+    lexer.
+
+    *New in Pygments 1.2.*
+    """
+    def __init__(self, **options):
+        Filter.__init__(self, **options)
+
+    def filter(self, lexer, stream):
+        output = []
+        current_type = None
+        current_value = None
+        for ttype, value in stream:
+            if ttype is current_type:
+                current_value += value
+            else:
+                if current_type is not None:
+                    yield current_type, current_value
+                current_type = ttype
+                current_value = value
+        if current_type is not None:
+            yield current_type, current_value
+
+
 FILTERS = {
     'codetagify':     CodeTagFilter,
     'keywordcase':    KeywordCaseFilter,
     'highlight':      NameHighlightFilter,
     'raiseonerror':   RaiseOnErrorTokenFilter,
     'whitespace':     VisibleWhitespaceFilter,
+    'gobble':         GobbleFilter,
+    'tokenmerge':     TokenMergeFilter,
 }
--- a/MoinMoin/support/pygments/formatter.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/formatter.py	Sun Feb 21 23:52:54 2010 +0100
@@ -5,7 +5,7 @@
 
     Base formatter class.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
--- a/MoinMoin/support/pygments/formatters/__init__.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/formatters/__init__.py	Sun Feb 21 23:52:54 2010 +0100
@@ -5,7 +5,7 @@
 
     Pygments formatters.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 import os.path
--- a/MoinMoin/support/pygments/formatters/_mapping.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/formatters/_mapping.py	Sun Feb 21 23:52:54 2010 +0100
@@ -9,7 +9,7 @@
 
     Do not alter the FORMATTERS dictionary by hand.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
--- a/MoinMoin/support/pygments/formatters/bbcode.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/formatters/bbcode.py	Sun Feb 21 23:52:54 2010 +0100
@@ -5,7 +5,7 @@
 
     BBcode formatter.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
--- a/MoinMoin/support/pygments/formatters/html.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/formatters/html.py	Sun Feb 21 23:52:54 2010 +0100
@@ -5,7 +5,7 @@
 
     Formatter for HTML output.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 import sys, os
--- a/MoinMoin/support/pygments/formatters/img.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/formatters/img.py	Sun Feb 21 23:52:54 2010 +0100
@@ -5,7 +5,7 @@
 
     Formatter for Pixmap output.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
@@ -13,7 +13,8 @@
 from commands import getstatusoutput
 
 from pygments.formatter import Formatter
-from pygments.util import get_bool_opt, get_int_opt, get_choice_opt
+from pygments.util import get_bool_opt, get_int_opt, \
+     get_list_opt, get_choice_opt
 
 # Import this carefully
 try:
@@ -207,6 +208,11 @@
 
         Default: True
 
+    `line_number_start`
+        The line number of the first line.
+
+        Default: 1
+
     `line_number_step`
         The step used when printing line numbers.
 
@@ -250,6 +256,16 @@
         the source code area.
 
         Default: 6
+
+    `hl_lines`
+        Specify a list of lines to be highlighted.  *New in Pygments 1.2.*
+
+        Default: empty list
+
+    `hl_color`
+        Specify the color for highlighting lines.  *New in Pygments 1.2.*
+
+        Default: highlight color of the selected style
     """
 
     # Required by the pygments mapper
@@ -299,11 +315,21 @@
         self.line_number_separator = get_bool_opt(options,
                                         'line_number_separator', True)
         self.line_number_step = get_int_opt(options, 'line_number_step', 1)
+        self.line_number_start = get_int_opt(options, 'line_number_start', 1)
         if self.line_numbers:
             self.line_number_width = (self.fontw * self.line_number_chars +
                                    self.line_number_pad * 2)
         else:
             self.line_number_width = 0
+        self.hl_lines = []
+        hl_lines_str = get_list_opt(options, 'hl_lines', [])
+        for line in hl_lines_str:
+            try:
+                self.hl_lines.append(int(line))
+            except ValueError:
+                pass
+        self.hl_color = options.get('hl_color',
+                                    self.style.highlight_color) or '#f90'
         self.drawables = []
 
     def get_style_defs(self, arg=''):
@@ -369,13 +395,13 @@
         return (self._get_char_x(maxcharno) + self.image_pad,
                 self._get_line_y(maxlineno + 0) + self.image_pad)
 
-    def _draw_linenumber(self, lineno):
+    def _draw_linenumber(self, posno, lineno):
         """
         Remember a line number drawable to paint later.
         """
         self._draw_text(
-            self._get_linenumber_pos(lineno),
-            str(lineno + 1).rjust(self.line_number_chars),
+            self._get_linenumber_pos(posno),
+            str(lineno).rjust(self.line_number_chars),
             font=self.fonts.get_font(self.line_number_bold,
                                      self.line_number_italic),
             fill=self.line_number_fg,
@@ -426,9 +452,10 @@
         """
         if not self.line_numbers:
             return
-        for i in xrange(self.maxlineno):
-            if ((i + 1) % self.line_number_step) == 0:
-                self._draw_linenumber(i)
+        for p in xrange(self.maxlineno):
+            n = p + self.line_number_start
+            if (n % self.line_number_step) == 0:
+                self._draw_linenumber(p, n)
 
     def _paint_line_number_bg(self, im):
         """
@@ -464,6 +491,15 @@
         )
         self._paint_line_number_bg(im)
         draw = ImageDraw.Draw(im)
+        # Highlight
+        if self.hl_lines:
+            x = self.image_pad + self.line_number_width - self.line_number_pad + 1
+            recth = self._get_line_height()
+            rectw = im.size[0] - x
+            for linenumber in self.hl_lines:
+                y = self._get_line_y(linenumber - 1)
+                draw.rectangle([(x, y), (x + rectw, y + recth)],
+                               fill=self.hl_color)
         for pos, value, font, kw in self.drawables:
             draw.text(pos, value, font=font, **kw)
         im.save(outfile, self.image_format.upper())
--- a/MoinMoin/support/pygments/formatters/latex.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/formatters/latex.py	Sun Feb 21 23:52:54 2010 +0100
@@ -5,7 +5,7 @@
 
     Formatter for LaTeX fancyvrb output.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
@@ -18,12 +18,16 @@
 
 
 def escape_tex(text, commandprefix):
-    return text.replace('@', '\x00').    \
-                replace('[', '\x01').    \
-                replace(']', '\x02').    \
-                replace('\x00', '@%sZat[]' % commandprefix).\
-                replace('\x01', '@%sZlb[]' % commandprefix).\
-                replace('\x02', '@%sZrb[]' % commandprefix)
+    return text.replace('\\', '\x00'). \
+                replace('{', '\x01'). \
+                replace('}', '\x02'). \
+                replace('^', '\x03'). \
+                replace('_', '\x04'). \
+                replace('\x00', r'\%sZbs{}' % commandprefix). \
+                replace('\x01', r'\%sZob{}' % commandprefix). \
+                replace('\x02', r'\%sZcb{}' % commandprefix). \
+                replace('\x03', r'\%sZca{}' % commandprefix). \
+                replace('\x04', r'\%sZus{}' % commandprefix)
 
 
 DOC_TEMPLATE = r'''
@@ -92,6 +96,12 @@
 
 %(styles)s
 
+\def\%(cp)sZbs{\char`\\}
+\def\%(cp)sZus{\char`\_}
+\def\%(cp)sZob{\char`\{}
+\def\%(cp)sZcb{\char`\}}
+\def\%(cp)sZca{\char`\^}
+%% for compatibility with earlier versions
 \def\%(cp)sZat{@}
 \def\%(cp)sZlb{[}
 \def\%(cp)sZrb{]}
@@ -177,6 +187,16 @@
         *New in Pygments 0.7.*
 
         *New in Pygments 0.10:* the default is now ``'PY'`` instead of ``'C'``.
+
+    `texcomments`
+        If set to ``True``, enables LaTeX comment lines.  That is, LaTex markup
+        in comment tokens is not escaped so that LaTeX can render it (default:
+        ``False``).  *New in Pygments 1.2.*
+
+    `mathescape`
+        If set to ``True``, enables LaTeX math mode escape in comments. That
+        is, ``'$...$'`` inside a comment will trigger math mode (default:
+        ``False``).  *New in Pygments 1.2.*
     """
     name = 'LaTeX'
     aliases = ['latex', 'tex']
@@ -192,6 +212,8 @@
         self.verboptions = options.get('verboptions', '')
         self.nobackground = get_bool_opt(options, 'nobackground', False)
         self.commandprefix = options.get('commandprefix', 'PY')
+        self.texcomments = get_bool_opt(options, 'texcomments', False)
+        self.mathescape = get_bool_opt(options, 'mathescape', False)
 
         self._create_stylesheet()
 
@@ -260,18 +282,46 @@
             realoutfile = outfile
             outfile = StringIO()
 
-        outfile.write(r'\begin{Verbatim}[commandchars=@\[\]')
+        outfile.write(r'\begin{Verbatim}[commandchars=\\\{\}')
         if self.linenos:
             start, step = self.linenostart, self.linenostep
             outfile.write(',numbers=left' +
                           (start and ',firstnumber=%d' % start or '') +
                           (step and ',stepnumber=%d' % step or ''))
+        if self.mathescape or self.texcomments:
+            outfile.write(r',codes={\catcode`\$=3\catcode`\^=7\catcode`\_=8}')
         if self.verboptions:
             outfile.write(',' + self.verboptions)
         outfile.write(']\n')
 
         for ttype, value in tokensource:
-            value = escape_tex(value, self.commandprefix)
+            if ttype in Token.Comment:
+                if self.texcomments:
+                    # Try to guess comment starting lexeme and escape it ...
+                    start = value[0:1]
+                    for i in xrange(1, len(value)):
+                        if start[0] != value[i]:
+                            break
+                        start += value[i]
+
+                    value = value[len(start):]
+                    start = escape_tex(start, self.commandprefix)
+
+                    # ... but do not escape inside comment.
+                    value = start + value
+                elif self.mathescape:
+                    # Only escape parts not inside a math environment.
+                    parts = value.split('$')
+                    in_math = False
+                    for i, part in enumerate(parts):
+                        if not in_math:
+                            parts[i] = escape_tex(part, self.commandprefix)
+                        in_math = not in_math
+                    value = '$'.join(parts)
+                else:
+                    value = escape_tex(value, self.commandprefix)
+            else:
+                value = escape_tex(value, self.commandprefix)
             styles = []
             while ttype is not Token:
                 try:
@@ -285,10 +335,10 @@
                 spl = value.split('\n')
                 for line in spl[:-1]:
                     if line:
-                        outfile.write("@%s[%s][%s]" % (cp, styleval, line))
+                        outfile.write("\\%s{%s}{%s}" % (cp, styleval, line))
                     outfile.write('\n')
                 if spl[-1]:
-                    outfile.write("@%s[%s][%s]" % (cp, styleval, spl[-1]))
+                    outfile.write("\\%s{%s}{%s}" % (cp, styleval, spl[-1]))
             else:
                 outfile.write(value)
 
--- a/MoinMoin/support/pygments/formatters/other.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/formatters/other.py	Sun Feb 21 23:52:54 2010 +0100
@@ -5,7 +5,7 @@
 
     Other formatters: NullFormatter, RawTokenFormatter.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
--- a/MoinMoin/support/pygments/formatters/rtf.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/formatters/rtf.py	Sun Feb 21 23:52:54 2010 +0100
@@ -5,7 +5,7 @@
 
     A formatter that generates RTF files.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
--- a/MoinMoin/support/pygments/formatters/svg.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/formatters/svg.py	Sun Feb 21 23:52:54 2010 +0100
@@ -5,7 +5,7 @@
 
     Formatter for SVG output.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
--- a/MoinMoin/support/pygments/formatters/terminal.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/formatters/terminal.py	Sun Feb 21 23:52:54 2010 +0100
@@ -5,7 +5,7 @@
 
     Formatter for terminal output with ANSI sequences.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
--- a/MoinMoin/support/pygments/formatters/terminal256.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/formatters/terminal256.py	Sun Feb 21 23:52:54 2010 +0100
@@ -11,7 +11,7 @@
 
     Formatter version 1.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
--- a/MoinMoin/support/pygments/lexer.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/lexer.py	Sun Feb 21 23:52:54 2010 +0100
@@ -5,7 +5,7 @@
 
     Base lexer classes.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 import re
--- a/MoinMoin/support/pygments/lexers/__init__.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/lexers/__init__.py	Sun Feb 21 23:52:54 2010 +0100
@@ -5,7 +5,7 @@
 
     Pygments lexers.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 import sys
--- a/MoinMoin/support/pygments/lexers/_clbuiltins.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/lexers/_clbuiltins.py	Sun Feb 21 23:52:54 2010 +0100
@@ -5,7 +5,7 @@
 
     ANSI Common Lisp builtins.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
--- a/MoinMoin/support/pygments/lexers/_luabuiltins.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/lexers/_luabuiltins.py	Sun Feb 21 23:52:54 2010 +0100
@@ -9,7 +9,7 @@
 
     Do not edit the MODULES dict by hand.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
--- a/MoinMoin/support/pygments/lexers/_mapping.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/lexers/_mapping.py	Sun Feb 21 23:52:54 2010 +0100
@@ -9,7 +9,7 @@
 
     Do not alter the LEXERS dictionary by hand.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
@@ -28,6 +28,7 @@
     'AntlrRubyLexer': ('pygments.lexers.parsers', 'ANTLR With Ruby Target', ('antlr-ruby', 'antlr-rb'), ('*.G', '*.g'), ()),
     'ApacheConfLexer': ('pygments.lexers.text', 'ApacheConf', ('apacheconf', 'aconf', 'apache'), ('.htaccess', 'apache.conf', 'apache2.conf'), ('text/x-apacheconf',)),
     'AppleScriptLexer': ('pygments.lexers.other', 'AppleScript', ('applescript',), ('*.applescript',), ()),
+    'AsymptoteLexer': ('pygments.lexers.other', 'Asymptote', ('asy',), ('*.asy',), ('text/x-asymptote',)),
     'BBCodeLexer': ('pygments.lexers.text', 'BBCode', ('bbcode',), (), ('text/x-bbcode',)),
     'BaseMakefileLexer': ('pygments.lexers.text', 'Makefile', ('basemake',), (), ()),
     'BashLexer': ('pygments.lexers.other', 'Bash', ('bash', 'sh'), ('*.sh', '*.ebuild', '*.eclass'), ('application/x-sh', 'application/x-shellscript')),
@@ -76,7 +77,9 @@
     'GenshiLexer': ('pygments.lexers.templates', 'Genshi', ('genshi', 'kid', 'xml+genshi', 'xml+kid'), ('*.kid',), ('application/x-genshi', 'application/x-kid')),
     'GenshiTextLexer': ('pygments.lexers.templates', 'Genshi Text', ('genshitext',), (), ('application/x-genshi-text', 'text/x-genshi')),
     'GettextLexer': ('pygments.lexers.text', 'Gettext Catalog', ('pot', 'po'), ('*.pot', '*.po'), ('application/x-gettext', 'text/x-gettext', 'text/gettext')),
+    'GherkinLexer': ('pygments.lexers.other', 'Gherkin', ('Cucumber', 'cucumber', 'Gherkin', 'gherkin'), ('*.feature',), ('text/x-gherkin',)),
     'GnuplotLexer': ('pygments.lexers.other', 'Gnuplot', ('gnuplot',), ('*.plot', '*.plt'), ('text/x-gnuplot',)),
+    'GoLexer': ('pygments.lexers.compiled', 'Go', ('go',), ('*.go',), ('text/x-gosrc',)),
     'GroffLexer': ('pygments.lexers.text', 'Groff', ('groff', 'nroff', 'man'), ('*.[1234567]', '*.man'), ('application/x-troff', 'text/troff')),
     'HaskellLexer': ('pygments.lexers.functional', 'Haskell', ('haskell', 'hs'), ('*.hs',), ('text/x-haskell',)),
     'HtmlDjangoLexer': ('pygments.lexers.templates', 'HTML+Django/Jinja', ('html+django', 'html+jinja'), (), ('text/html+django', 'text/html+jinja')),
--- a/MoinMoin/support/pygments/lexers/_phpbuiltins.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/lexers/_phpbuiltins.py	Sun Feb 21 23:52:54 2010 +0100
@@ -12,7 +12,7 @@
              internet connection. don't run that at home, use
              a server ;-)
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
--- a/MoinMoin/support/pygments/lexers/agile.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/lexers/agile.py	Sun Feb 21 23:52:54 2010 +0100
@@ -5,7 +5,7 @@
 
     Lexers for agile languages.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
@@ -319,8 +319,10 @@
                 insertions.append((len(curcode),
                                    [(0, Generic.Prompt, line[:4])]))
                 curcode += line[4:]
-            elif line.rstrip() == '...':
-                tb = 0
+            elif line.rstrip() == '...' and not tb:
+                # only a new >>> prompt can end an exception block
+                # otherwise an ellipsis in place of the traceback frames
+                # will be mishandled
                 insertions.append((len(curcode),
                                    [(0, Generic.Prompt, '...')]))
                 curcode += line[3:]
@@ -560,22 +562,22 @@
         # these must come after %<brace>!
         states['strings'] += [
             # %r regex
-            (r'(%r([^a-zA-Z0-9]))([^\2\\]*(?:\\.[^\2\\]*)*)(\2[mixounse]*)',
+            (r'(%r([^a-zA-Z0-9]))((?:\\\2|(?!\2).)*)(\2[mixounse]*)',
              intp_regex_callback),
             # regular fancy strings with qsw
-            (r'%[qsw]([^a-zA-Z0-9])([^\1\\]*(?:\\.[^\1\\]*)*)\1', String.Other),
-            (r'(%[QWx]([^a-zA-Z0-9]))([^\2\\]*(?:\\.[^\2\\]*)*)(\2)',
+            (r'%[qsw]([^a-zA-Z0-9])((?:\\\1|(?!\1).)*)\1', String.Other),
+            (r'(%[QWx]([^a-zA-Z0-9]))((?:\\\2|(?!\2).)*)(\2)',
              intp_string_callback),
             # special forms of fancy strings after operators or
             # in method calls with braces
-            (r'(?<=[-+/*%=<>&!^|~,(])(\s*)(%([\t ])(?:[^\3\\]*(?:\\.[^\3\\]*)*)\3)',
+            (r'(?<=[-+/*%=<>&!^|~,(])(\s*)(%([\t ])(?:(?:\\\3|(?!\3).)*)\3)',
              bygroups(Text, String.Other, None)),
             # and because of fixed width lookbehinds the whole thing a
             # second time for line startings...
-            (r'^(\s*)(%([\t ])(?:[^\3\\]*(?:\\.[^\3\\]*)*)\3)',
+            (r'^(\s*)(%([\t ])(?:(?:\\\3|(?!\3).)*)\3)',
              bygroups(Text, String.Other, None)),
             # all regular fancy strings without qsw
-            (r'(%([^a-zA-Z0-9\s]))([^\2\\]*(?:\\.[^\2\\]*)*)(\2)',
+            (r'(%([^a-zA-Z0-9\s]))((?:\\\2|(?!\2).)*)(\2)',
              intp_string_callback),
         ]
 
@@ -1310,12 +1312,12 @@
         ],
         'string': [
             (r'\[', String.Double, 'string-square'),
-            (r'(\\\\|\\[0-7]+|\\.|[^"])', String.Double),
+            (r'(?s)(\\\\|\\[0-7]+|\\.|[^"\\])', String.Double),
             (r'"', String.Double, '#pop')
         ],
         'string-square': [
             (r'\[', String.Double, 'string-square'),
-            (r'(\\\\|\\[0-7]+|\\.|[^\]])', String.Double),
+            (r'(?s)(\\\\|\\[0-7]+|\\.|\\\n|[^\]\\])', String.Double),
             (r'\]', String.Double, '#pop')
         ],
         'brace': [
--- a/MoinMoin/support/pygments/lexers/asm.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/lexers/asm.py	Sun Feb 21 23:52:54 2010 +0100
@@ -5,7 +5,7 @@
 
     Lexers for assembly languages.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
@@ -199,7 +199,7 @@
 
     #: optional Comment or Whitespace
     string = r'"[^"]*?"'
-    identifier = r'([a-zA-Z$._][a-zA-Z$._0-9]*|' + string + ')'
+    identifier = r'([-a-zA-Z$._][-a-zA-Z$._0-9]*|' + string + ')'
 
     tokens = {
         'root': [
@@ -211,14 +211,17 @@
             include('keyword'),
 
             (r'%' + identifier, Name.Variable),#Name.Identifier.Local),
-            (r'@' + identifier, Name.Constant),#Name.Identifier.Global),
+            (r'@' + identifier, Name.Variable.Global),#Name.Identifier.Global),
             (r'%\d+', Name.Variable.Anonymous),#Name.Identifier.Anonymous),
+            (r'@\d+', Name.Variable.Global),#Name.Identifier.Anonymous),
+            (r'!' + identifier, Name.Variable),
+            (r'!\d+', Name.Variable.Anonymous),
             (r'c?' + string, String),
 
             (r'0[xX][a-fA-F0-9]+', Number),
             (r'-?\d+(?:[.]\d+)?(?:[eE][-+]?\d+(?:[.]\d+)?)?', Number),
 
-            (r'[=<>{}\[\]()*.,]|x\b', Punctuation)
+            (r'[=<>{}\[\]()*.,!]|x\b', Punctuation)
         ],
         'whitespace': [
             (r'(\n|\s)+', Text),
@@ -226,36 +229,56 @@
         ],
         'keyword': [
             # Regular keywords
-            (r'(void|label|float|double|opaque'
-             r'|to'
-             r'|alias|type'
-             r'|zeroext|signext|inreg|sret|noalias|noreturn|nounwind|nest'
-             r'|module|asm|target|datalayout|triple'
-             r'|true|false|null|zeroinitializer|undef'
-             r'|global|internal|external|linkonce|weak|appending|extern_weak'
-             r'|dllimport|dllexport'
-             r'|ccc|fastcc|coldcc|cc|tail'
-             r'|default|hidden|protected'
-             r'|thread_local|constant|align|section'
-             r'|define|declare'
+            (r'(begin|end'
+             r'|true|false'
+             r'|declare|define'
+             r'|global|constant'
 
-             # Statements & expressions
-             r'|trunc|zext|sext|fptrunc|fpext|fptoui|fptosi|uitofp|sitofp'
-             r'|ptrtoint|inttoptr|bitcast|getelementptr|select|icmp|fcmp'
-             r'|extractelement|insertelement|shufflevector'
-             r'|sideeffect|volatile'
-             r'|ret|br|switch|invoke|unwind|unreachable'
-             r'|add|sub|mul|udiv|sdiv|fdiv|urem|srem|frem'
-             r'|shl|lshr|ashr|and|or|xor'
-             r'|malloc|free|alloca|load|store'
-             r'|phi|call|va_arg|va_list'
+             r'|private|linker_private|internal|available_externally|linkonce'
+             r'|linkonce_odr|weak|weak_odr|appending|dllimport|dllexport'
+             r'|common|default|hidden|protected|extern_weak|external'
+             r'|thread_local|zeroinitializer|undef|null|to|tail|target|triple'
+             r'|deplibs|datalayout|volatile|nuw|nsw|exact|inbounds|align'
+             r'|addrspace|section|alias|module|asm|sideeffect|gc|dbg'
 
-             # Comparison condition codes for icmp
-             r'|eq|ne|ugt|uge|ult|ule|sgt|sge|slt|sle'
-             # Ditto for fcmp: (minus keywords mentioned in other contexts)
-             r'|oeq|ogt|oge|olt|ole|one|ord|ueq|ugt|uge|une|uno'
+             r'|ccc|fastcc|coldcc|x86_stdcallcc|x86_fastcallcc|arm_apcscc'
+             r'|arm_aapcscc|arm_aapcs_vfpcc'
+
+             r'|cc|c'
+
+             r'|signext|zeroext|inreg|sret|nounwind|noreturn|noalias|nocapture'
+             r'|byval|nest|readnone|readonly'
+
+             r'|inlinehint|noinline|alwaysinline|optsize|ssp|sspreq|noredzone'
+             r'|noimplicitfloat|naked'
+
+             r'|type|opaque'
+
+             r'|eq|ne|slt|sgt|sle'
+             r'|sge|ult|ugt|ule|uge'
+             r'|oeq|one|olt|ogt|ole'
+             r'|oge|ord|uno|ueq|une'
+             r'|x'
+
+             # instructions
+             r'|add|fadd|sub|fsub|mul|fmul|udiv|sdiv|fdiv|urem|srem|frem|shl'
+             r'|lshr|ashr|and|or|xor|icmp|fcmp'
+
+             r'|phi|call|trunc|zext|sext|fptrunc|fpext|uitofp|sitofp|fptoui'
+             r'fptosi|inttoptr|ptrtoint|bitcast|select|va_arg|ret|br|switch'
+             r'|invoke|unwind|unreachable'
+
+             r'|malloc|alloca|free|load|store|getelementptr'
+
+             r'|extractelement|insertelement|shufflevector|getresult'
+             r'|extractvalue|insertvalue'
 
              r')\b', Keyword),
+
+            # Types
+            (r'void|float|double|x86_fp80|fp128|ppc_fp128|label|metadata',
+             Keyword.Type),
+
             # Integer types
             (r'i[1-9]\d*', Keyword)
         ]
@@ -272,7 +295,7 @@
     mimetypes = ['text/x-nasm']
 
     identifier = r'[a-zA-Z$._?][a-zA-Z0-9$._?#@~]*'
-    hexn = r'(?:0[xX][0-9a-fA-F]+|$0[0-9a-fA-F]*|[0-9a-fA-F]+h)'
+    hexn = r'(?:0[xX][0-9a-fA-F]+|$0[0-9a-fA-F]*|[0-9]+[0-9a-fA-F]*h)'
     octn = r'[0-7]+q'
     binn = r'[01]+b'
     decn = r'[0-9]+'
@@ -284,7 +307,8 @@
     wordop = r'seg|wrt|strict'
     type = r'byte|[dq]?word'
     directives = (r'BITS|USE16|USE32|SECTION|SEGMENT|ABSOLUTE|EXTERN|GLOBAL|'
-                  r'COMMON|CPU|GROUP|UPPERCASE|IMPORT|EXPORT|LIBRARY|MODULE')
+                  r'ORG|ALIGN|STRUC|ENDSTRUC|COMMON|CPU|GROUP|UPPERCASE|IMPORT|'
+                  r'EXPORT|LIBRARY|MODULE')
 
     flags = re.IGNORECASE | re.MULTILINE
     tokens = {
@@ -292,10 +316,10 @@
             include('whitespace'),
             (r'^\s*%', Comment.Preproc, 'preproc'),
             (identifier + ':', Name.Label),
+            (r'(%s)(\s+)(equ)' % identifier,
+                bygroups(Name.Constant, Keyword.Declaration, Keyword.Declaration),
+                'instruction-args'),
             (directives, Keyword, 'instruction-args'),
-            (r'(%s)\s+(equ)' % identifier,
-                bygroups(Name.Constant, Keyword.Declaration),
-                'instruction-args'),
             (declkw, Keyword.Declaration, 'instruction-args'),
             (identifier, Name.Function, 'instruction-args'),
             (r'[\r\n]+', Text)
--- a/MoinMoin/support/pygments/lexers/compiled.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/lexers/compiled.py	Sun Feb 21 23:52:54 2010 +0100
@@ -5,7 +5,7 @@
 
     Lexers for compiled languages.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
@@ -29,7 +29,7 @@
 __all__ = ['CLexer', 'CppLexer', 'DLexer', 'DelphiLexer', 'JavaLexer',
            'ScalaLexer', 'DylanLexer', 'OcamlLexer', 'ObjectiveCLexer',
            'FortranLexer', 'GLShaderLexer', 'PrologLexer', 'CythonLexer',
-           'ValaLexer', 'OocLexer']
+           'ValaLexer', 'OocLexer', 'GoLexer']
 
 
 class CLexer(RegexLexer):
@@ -241,6 +241,8 @@
 class DLexer(RegexLexer):
     """
     For D source.
+
+    *New in Pygments 1.2.*
     """
     name = 'D'
     filenames = ['*.d', '*.di']
@@ -304,8 +306,8 @@
             # -- DoubleQuotedString
             (r'"(\\\\|\\"|[^"])*"[cwd]?', String),
             # -- EscapeSequence
-            (r"""\\(['"?\\abfnrtv]|x[0-9a-fA-F]{2}|[0-7]{1,3}"""
-             r"""|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8}|&\w+;)""",
+            (r"\\(['\"?\\abfnrtv]|x[0-9a-fA-F]{2}|[0-7]{1,3}"
+             r"|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8}|&\w+;)",
              String
             ),
             # -- HexString
@@ -1294,8 +1296,8 @@
         ],
 
         'strings': [
-            (r'"(\\\\|\\[0-7]+|\\.|[^"])*"', String.Double),
-            (r"'(\\\\|\\[0-7]+|\\.|[^'])*'", String.Single),
+            (r'(?s)"(\\\\|\\[0-7]+|\\.|[^"\\])*"', String.Double),
+            (r"(?s)'(\\\\|\\[0-7]+|\\.|[^'\\])*'", String.Single),
         ],
 
         'nums': [
@@ -1665,7 +1667,7 @@
 
 class OocLexer(RegexLexer):
     """
-    For `Ooc`<http://ooc-lang.org/>_ source code
+    For `Ooc <http://ooc-lang.org/>`_ source code
 
     *New in Pygments 1.2.*
     """
@@ -1727,3 +1729,64 @@
             (r'[;\n]', Text, '#pop'),
         ],
     }
+
+
+class GoLexer(RegexLexer):
+    """
+    For `Go <http://golang.org>`_ source.
+    """
+    name = 'Go'
+    filenames = ['*.go']
+    aliases = ['go']
+    mimetypes = ['text/x-gosrc']
+
+    tokens = {
+        'root': [
+            (r'\n', Text),
+            (r'\s+', Text),
+            (r'\\\n', Text), # line continuations
+            (r'//(.*?)\n', Comment.Single),
+            (r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment.Multiline),
+            (r'(break|default|func|interface|select'
+             r'|case|defer|go|map|struct'
+             r'|chan|else|goto|package|switch'
+             r'|const|fallthrough|if|range|type'
+             r'|continue|for|import|return|var)\b', Keyword
+            ),
+            # It seems the builtin types aren't actually keywords.
+            (r'(uint8|uint16|uint32|uint64'
+             r'|int8|int16|int32|int64'
+             r'|float32|float64|byte'
+             r'|uint|int|float|uintptr'
+             r'|string|close|closed|len|cap|new|make)\b', Name.Builtin
+            ),
+            # float_lit
+            (r'\d+(\.\d+[eE][+\-]?\d+|'
+             r'\.\d*|[eE][+\-]?\d+)', Number.Float),
+            (r'\.\d+([eE][+\-]?\d+)?', Number.Float),
+            # int_lit
+            # -- octal_lit
+            (r'0[0-7]+', Number.Oct),
+            # -- hex_lit
+            (r'0[xX][0-9a-fA-F]+', Number.Hex),
+            # -- decimal_lit
+            (r'(0|[1-9][0-9]*)', Number.Integer),
+            # char_lit
+            (r"""'(\\['"\\abfnrtv]|\\x[0-9a-fA-F]{2}|\\[0-7]{1,3}"""
+             r"""|\\u[0-9a-fA-F]{4}|\\U[0-9a-fA-F]{8}|[^\\])'""",
+             String.Char
+            ),
+            # StringLiteral
+            # -- raw_string_lit
+            (r'`[^`]*`', String),
+            # -- interpreted_string_lit
+            (r'"(\\\\|\\"|[^"])*"', String),
+            # Tokens
+            (r'(<<=|>>=|<<|>>|<=|>=|&\^=|&\^|\+=|-=|\*=|/=|%=|&=|\|=|&&|\|\|'
+             r'|<-|\+\+|--|==|!=|:=|\.\.\.)|[+\-*/%&|^<>=!()\[\]{}.,;:]',
+             Punctuation
+            ),
+            # identifier
+            (r'[a-zA-Z_]\w*', Name),
+        ]
+    }
--- a/MoinMoin/support/pygments/lexers/dotnet.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/lexers/dotnet.py	Sun Feb 21 23:52:54 2010 +0100
@@ -5,7 +5,7 @@
 
     Lexers for .net languages.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 import re
--- a/MoinMoin/support/pygments/lexers/functional.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/lexers/functional.py	Sun Feb 21 23:52:54 2010 +0100
@@ -5,7 +5,7 @@
 
     Lexers for functional languages.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
@@ -245,7 +245,7 @@
             (r'#\d*Y.*$', Comment.Special),
 
             # strings and characters
-            (r'"(\\.|[^"])*"', String),
+            (r'"(\\.|[^"\\])*"', String),
             # quoting
             (r":" + symbol, String.Symbol),
             (r"'" + symbol, String.Symbol),
@@ -443,7 +443,7 @@
             (r'o[0-7]+', String.Escape, '#pop'),
             (r'x[\da-fA-F]+', String.Escape, '#pop'),
             (r'\d+', String.Escape, '#pop'),
-            (r'\n\s+\\', String.Escape, '#pop'),
+            (r'\s+\\', String.Escape, '#pop'),
         ],
     }
 
--- a/MoinMoin/support/pygments/lexers/math.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/lexers/math.py	Sun Feb 21 23:52:54 2010 +0100
@@ -5,7 +5,7 @@
 
     Lexers for math languages.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
--- a/MoinMoin/support/pygments/lexers/other.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/lexers/other.py	Sun Feb 21 23:52:54 2010 +0100
@@ -5,7 +5,7 @@
 
     Lexers for other languages.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
@@ -24,7 +24,7 @@
            'MOOCodeLexer', 'SmalltalkLexer', 'TcshLexer', 'LogtalkLexer',
            'GnuplotLexer', 'PovrayLexer', 'AppleScriptLexer',
            'BashSessionLexer', 'ModelicaLexer', 'RebolLexer', 'ABAPLexer',
-           'NewspeakLexer']
+           'NewspeakLexer', 'GherkinLexer', 'AsymptoteLexer']
 
 line_re  = re.compile('.*?\n')
 
@@ -359,8 +359,8 @@
             (r'&&|\|\|', Operator),
         ],
         'data': [
-            (r'\$?"(\\\\|\\[0-7]+|\\.|[^"])*"', String.Double),
-            (r"\$?'(\\\\|\\[0-7]+|\\.|[^'])*'", String.Single),
+            (r'(?s)\$?"(\\\\|\\[0-7]+|\\.|[^"\\])*"', String.Double),
+            (r"(?s)\$?'(\\\\|\\[0-7]+|\\.|[^'\\])*'", String.Single),
             (r';', Text),
             (r'\s+', Text),
             (r'[^=\s\n\[\]{}()$"\'`\\<]+', Text),
@@ -745,8 +745,8 @@
             (r'<<\s*(\'?)\\?(\w+)[\w\W]+?\2', String),
         ],
         'data': [
-            (r'"(\\\\|\\[0-7]+|\\.|[^"])*"', String.Double),
-            (r"'(\\\\|\\[0-7]+|\\.|[^'])*'", String.Single),
+            (r'(?s)"(\\\\|\\[0-7]+|\\.|[^"\\])*"', String.Double),
+            (r"(?s)'(\\\\|\\[0-7]+|\\.|[^'\\])*'", String.Single),
             (r'\s+', Text),
             (r'[^=\s\n\[\]{}()$"\'`\\]+', Text),
             (r'\d+(?= |\Z)', Number),
@@ -808,7 +808,8 @@
             # Reflection
             (r'(current_predicate|predicate_property)(?=[(])', Keyword),
             # DCGs and term expansion
-            (r'(expand_term|(goal|term)_expansion|phrase)(?=[(])', Keyword),
+            (r'(expand_(goal|term)|(goal|term)_expansion|phrase)(?=[(])',
+             Keyword),
             # Entity
             (r'(abolish|c(reate|urrent))_(object|protocol|category)(?=[(])',
              Keyword),
@@ -921,19 +922,22 @@
         ],
 
         'directive': [
+            # Conditional compilation directives
+            (r'(el)?if(?=[(])', Keyword, 'root'),
+            (r'(e(lse|ndif))[.]', Keyword, 'root'),
             # Entity directives
             (r'(category|object|protocol)(?=[(])', Keyword, 'entityrelations'),
             (r'(end_(category|object|protocol))[.]',Keyword, 'root'),
             # Predicate scope directives
             (r'(public|protected|private)(?=[(])', Keyword, 'root'),
             # Other directives
-            (r'e(ncoding|xport)(?=[(])', Keyword, 'root'),
+            (r'e(n(coding|sure_loaded)|xport)(?=[(])', Keyword, 'root'),
             (r'in(fo|itialization)(?=[(])', Keyword, 'root'),
             (r'(dynamic|synchronized|threaded)[.]', Keyword, 'root'),
-            (r'(alias|d(ynamic|iscontiguous)|m(eta_predicate|ode|ultifile)'
-             r'|synchronized)(?=[(])', Keyword, 'root'),
+            (r'(alias|d(ynamic|iscontiguous)|m(eta_predicate|ode|ultifile)|'
+             r's(et_(logtalk|prolog)_flag|ynchronized))(?=[(])', Keyword, 'root'),
             (r'op(?=[(])', Keyword, 'root'),
-            (r'(calls|use(s|_module))(?=[(])', Keyword, 'root'),
+            (r'(calls|reexport|use(s|_module))(?=[(])', Keyword, 'root'),
             (r'[a-z][a-zA-Z0-9_]*(?=[(])', Text, 'root'),
             (r'[a-z][a-zA-Z0-9_]*[.]', Text, 'root'),
         ],
@@ -969,6 +973,15 @@
         ]
     }
 
+    def analyse_text(text):
+        if ':- object(' in text:
+            return True
+        if ':- protocol(' in text:
+            return True
+        if ':- category(' in text:
+            return True
+        return False
+
 
 def _shortened(word):
     dpos = word.find('$')
@@ -1151,7 +1164,7 @@
         'root': [
             (r'/\*[\w\W]*?\*/', Comment.Multiline),
             (r'//.*\n', Comment.Single),
-            (r'"(?:\\.|[^"])+"', String.Double),
+            (r'(?s)"(?:\\.|[^"\\])+"', String.Double),
             (r'#(debug|default|else|end|error|fclose|fopen|if|ifdef|ifndef|'
              r'include|range|read|render|statistics|switch|undef|version|'
              r'warning|while|write|define|macro|local|declare)',
@@ -2080,3 +2093,210 @@
        ]
     }
 
+class GherkinLexer(RegexLexer):
+    """
+    For `Gherkin <http://cukes.info/>` syntax.
+
+    *New in Pygments 1.2.*
+    """
+    name = 'Gherkin'
+    aliases = ['Cucumber', 'cucumber', 'Gherkin', 'gherkin']
+    filenames = ['*.feature']
+    mimetypes = ['text/x-gherkin']
+
+    feature_keywords_regexp  = ur'^(기능|機能|功能|フィーチャ|خاصية|תכונה|Функционалност|Функционал|Особина|Могућност|Özellik|Właściwość|Tính năng|Savybė|Požiadavka|Požadavek|Osobina|Ominaisuus|Omadus|OH HAI|Mogućnost|Mogucnost|Jellemző|Fīča|Funzionalità|Funktionalität|Funkcionalnost|Funkcionalitāte|Funcționalitate|Functionaliteit|Functionalitate|Funcionalidade|Fonctionnalité|Fitur|Feature|Egenskap|Egenskab|Crikey|Característica|Arwedd)(:)(.*)$'
+    scenario_keywords_regexp = ur'^(\s*)(시나리오 개요|시나리오|배경|背景|場景大綱|場景|场景大纲|场景|劇本大綱|劇本|テンプレ|シナリオテンプレート|シナリオテンプレ|シナリオアウトライン|シナリオ|سيناريو مخطط|سيناريو|الخلفية|תרחיש|תבנית תרחיש|רקע|Тарих|Сценарио|Сценарий структураси|Сценарий|Структура сценарија|Структура сценария|Скица|Рамка на сценарий|Пример|Предыстория|Предистория|Позадина|Основа|Концепт|Контекст|Założenia|Tình huống|Tausta|Taust|Tapausaihio|Tapaus|Szenariogrundriss|Szenario|Szablon scenariusza|Stsenaarium|Struktura scenarija|Skica|Skenario konsep|Skenario|Situācija|Senaryo taslağı|Senaryo|Scénář|Scénario|Schema dello scenario|Scenārijs pēc parauga|Scenārijs|Scenár|Scenariusz|Scenariul de şablon|Scenariul de sablon|Scenariu|Scenario Outline|Scenario Amlinellol|Scenario|Scenarijus|Scenarijaus šablonas|Scenarij|Scenarie|Rerefons|Raamstsenaarium|Primer|Pozadí|Pozadina|Pozadie|Plan du scénario|Plan du Scénario|Osnova scénáře|Osnova|Náčrt Scénáře|Náčrt Scenáru|Mate|MISHUN SRSLY|MISHUN|Kịch bản|Kontext|Konteksts|Kontekstas|Kontekst|Koncept|Khung tình huống|Khung kịch bản|Háttér|Grundlage|Geçmiş|Forgatókönyv vázlat|Forgatókönyv|Esquema do Cenário|Esquema do Cenario|Esquema del escenario|Esquema de l\'escenari|Escenario|Escenari|Dasar|Contexto|Contexte|Contesto|Condiţii|Conditii|Cenário|Cenario|Cefndir|Bối cảnh|Blokes|Bakgrunn|Bakgrund|Baggrund|Background|B4|Antecedents|Antecedentes|All y\'all|Achtergrond|Abstrakt Scenario|Abstract Scenario)(:)(.*)$'
+    examples_regexp          = ur'^(\s*)(예|例子|例|サンプル|امثلة|דוגמאות|Сценарији|Примери|Мисоллар|Значения|Örnekler|Voorbeelden|Variantai|Tapaukset|Scenarios|Scenariji|Scenarijai|Příklady|Példák|Príklady|Przykłady|Primjeri|Primeri|Piemēri|Pavyzdžiai|Paraugs|Juhtumid|Exemplos|Exemples|Exemplele|Exempel|Examples|Esempi|Enghreifftiau|Eksempler|Ejemplos|EXAMPLZ|Dữ liệu|Contoh|Cobber|Beispiele)(:)(.*)$'
+    step_keywords_regexp     = ur'^(\s*)(하지만|조건|만일|그리고|그러면|那麼|那么|而且|當|当|前提|假設|假如|但是|但し|並且|もし|ならば|ただし|しかし|かつ|و |متى |لكن |عندما |ثم |بفرض |اذاً |כאשר |וגם |בהינתן |אזי |אז |אבל |Унда |То |Онда |Но |Лекин |Когато |Када |Кад |К тому же |И |Задато |Задати |Задате |Если |Допустим |Дадено |Ва |Бирок |Аммо |Али |Агар |А |Și |És |anrhegedig a |Zatati |Zakładając |Zadato |Zadate |Zadano |Zadani |Zadan |Yna |Ya know how |Ya gotta |Y |Wtedy |When y\'all |When |Wenn |WEN |Và |Ve |Und |Un |Thì |Then y\'all |Then |Tapi |Tak |Tada |Tad |Så |Soit |Siis |Si |Quando |Quand |Quan |Pryd |Pokud |Pokiaľ |Però |Pero |Pak |Oraz |Onda |Ond |Oletetaan |Og |Och |O zaman |Når |När |Niin |Nhưng |N |Mutta |Men |Mas |Maka |Majd |Mais |Maar |Ma |Lorsque |Lorsqu\'|Kun |Kuid |Kui |Khi |Keď |Ketika |Když |Kai |Kada |Kad |Jeżeli |Ja |Ir |I CAN HAZ |I |Ha |Givet |Given y\'all |Given |Gitt |Gegeven |Gegeben sei |Fakat |Eğer ki |Etant donné |Et |Então |Entonces |Entao |En |Eeldades |E |Duota |Donat |Donada |Diyelim ki |Dengan |De |Dato |Dar |Dann |Dan |Dado |Dacă |Daca |DEN |Când |Cuando |Cho |Cept |Cand |But y\'all |But |Biết |Bet |BUT |Atunci |And y\'all |And |Ama |Als |Alors |Allora |Ali |Aleshores |Ale |Akkor |Aber |AN |A také |A )'
+
+    tokens = {
+        'comments': [
+            (r'#.*$', Comment),
+          ],
+        'multiline_descriptions' : [
+            (step_keywords_regexp, Keyword, "#pop"),
+            include('comments'),
+            (r"(\s|.)", Name.Constant),
+          ],
+        'multiline_descriptions_on_stack' : [
+            (step_keywords_regexp, Keyword, "#pop:2"),
+            include('comments'),
+            (r"(\s|.)", Name.Constant),
+          ],
+        'scenario_table_description': [
+            (r"\s+\|", Text, 'scenario_table_header'),
+            include('comments'),
+            (r"(\s|.)", Name.Constant),
+          ],
+        'scenario_table_header': [
+            (r"\s+\|\s*$", Text, "#pop:2"),
+            (r"(\s+\|\s*)(#.*)$", bygroups(Text, Comment), "#pop:2"),
+            include('comments'),
+            (r"\s+\|", Text),
+            (r"[^\|]", Name.Variable),
+          ],
+        'scenario_sections_on_stack': [
+            (scenario_keywords_regexp,
+             bygroups(Text, Name.Class, Name.Class, Name.Constant),
+             "multiline_descriptions_on_stack"),
+            ],
+        'narrative': [
+            include('scenario_sections_on_stack'),
+            (r"(\s|.)", Name.Builtin),
+          ],
+        'table_vars': [
+            (r'(<[^>]*>)', bygroups(Name.Variable)),
+          ],
+        'string': [
+            include('table_vars'),
+            (r'(\s|.)', String),
+          ],
+        'py_string': [
+            (r'"""', String, "#pop"),
+            include('string'),
+          ],
+        'double_string': [
+            (r'"', String, "#pop"),
+            include('string'),
+          ],
+        'single_string': [
+            (r"'", String, "#pop"),
+            include('string'),
+          ],
+        'root': [
+            (r'\n', Text),
+            include('comments'),
+            (r'"""', String, "py_string"),
+            (r'"', String, "double_string"),
+            (r"'", String, "single_string"),
+            include('table_vars'),
+            (r'@[^@\s]+', Name.Namespace),
+            (step_keywords_regexp, bygroups(Text, Keyword)),
+            (feature_keywords_regexp,
+             bygroups(Name.Class, Name.Class, Name.Constant), 'narrative'),
+            (scenario_keywords_regexp,
+             bygroups(Text, Name.Class, Name.Class, Name.Constant),
+             "multiline_descriptions"),
+            (examples_regexp,
+             bygroups(Text, Name.Class, Name.Class, Name.Constant),
+             "scenario_table_description"),
+            (r'(\s|.)', Text),
+        ]
+    }
+
+
+class AsymptoteLexer(RegexLexer):
+    """
+    For `Asymptote <http://asymptote.sf.net/>`_ source code.
+
+    *New in Pygments 1.2.*
+    """
+    name = 'Asymptote'
+    aliases = ['asy', 'asymptote']
+    filenames = ['*.asy']
+    mimetypes = ['text/x-asymptote']
+
+    #: optional Comment or Whitespace
+    _ws = r'(?:\s|//.*?\n|/[*].*?[*]/)+'
+
+    tokens = {
+        'whitespace': [
+            (r'\n', Text),
+            (r'\s+', Text),
+            (r'\\\n', Text), # line continuation
+            (r'//(\n|(.|\n)*?[^\\]\n)', Comment),
+            (r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment),
+        ],
+        'statements': [
+            # simple string (TeX friendly)
+            (r'"(\\\\|\\"|[^"])*"', String),
+            # C style string (with character escapes)
+            (r"'", String, 'string'),
+            (r'(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[lL]?', Number.Float),
+            (r'(\d+\.\d*|\.\d+|\d+[fF])[fF]?', Number.Float),
+            (r'0x[0-9a-fA-F]+[Ll]?', Number.Hex),
+            (r'0[0-7]+[Ll]?', Number.Oct),
+            (r'\d+[Ll]?', Number.Integer),
+            (r'[~!%^&*+=|?:<>/-]', Operator),
+            (r'[()\[\],.]', Punctuation),
+            (r'\b(case)(.+?)(:)', bygroups(Keyword, using(this), Text)),
+            (r'(and|controls|tension|atleast|curl|if|else|while|for|do|'
+             r'return|break|continue|struct|typedef|new|access|import|'
+             r'unravel|from|include|quote|static|public|private|restricted|'
+             r'this|explicit|true|false|null|cycle|newframe|operator)\b', Keyword),
+            # Since an asy-type-name can be also an asy-function-name,
+            # in the following we test if the string "  [a-zA-Z]" follows
+            # the Keyword.Type.
+            # Of course it is not perfect !
+            (r'(Braid|FitResult|Label|Legend|TreeNode|abscissa|arc|arrowhead|'
+             r'binarytree|binarytreeNode|block|bool|bool3|bounds|bqe|circle|'
+             r'conic|coord|coordsys|cputime|ellipse|file|filltype|frame|grid3|'
+             r'guide|horner|hsv|hyperbola|indexedTransform|int|inversion|key|'
+             r'light|line|linefit|marginT|marker|mass|object|pair|parabola|path|'
+             r'path3|pen|picture|point|position|projection|real|revolution|'
+             r'scaleT|scientific|segment|side|slice|splitface|string|surface|'
+             r'tensionSpecifier|ticklocate|ticksgridT|tickvalues|transform|'
+             r'transformation|tree|triangle|trilinear|triple|vector|'
+             r'vertex|void)(?=([ ]{1,}[a-zA-Z]))', Keyword.Type),
+            # Now the asy-type-name which are not asy-function-name
+            # except yours !
+            # Perhaps useless
+            (r'(Braid|FitResult|TreeNode|abscissa|arrowhead|block|bool|bool3|'
+             r'bounds|coord|frame|guide|horner|int|linefit|marginT|pair|pen|'
+             r'picture|position|real|revolution|slice|splitface|ticksgridT|'
+             r'tickvalues|tree|triple|vertex|void)\b', Keyword.Type),
+            ('[a-zA-Z_][a-zA-Z0-9_]*:(?!:)', Name.Label),
+            ('[a-zA-Z_][a-zA-Z0-9_]*', Name),
+            ],
+        'root': [
+            include('whitespace'),
+            # functions
+            (r'((?:[a-zA-Z0-9_*\s])+?(?:\s|[*]))'    # return arguments
+             r'([a-zA-Z_][a-zA-Z0-9_]*)'             # method name
+             r'(\s*\([^;]*?\))'                      # signature
+             r'(' + _ws + r')({)',
+             bygroups(using(this), Name.Function, using(this), using(this),
+                      Punctuation),
+             'function'),
+            # function declarations
+            (r'((?:[a-zA-Z0-9_*\s])+?(?:\s|[*]))'    # return arguments
+             r'([a-zA-Z_][a-zA-Z0-9_]*)'             # method name
+             r'(\s*\([^;]*?\))'                      # signature
+             r'(' + _ws + r')(;)',
+             bygroups(using(this), Name.Function, using(this), using(this),
+                      Punctuation)),
+            ('', Text, 'statement'),
+        ],
+        'statement' : [
+            include('whitespace'),
+            include('statements'),
+            ('[{}]', Punctuation),
+            (';', Punctuation, '#pop'),
+        ],
+        'function': [
+            include('whitespace'),
+            include('statements'),
+            (';', Punctuation),
+            ('{', Punctuation, '#push'),
+            ('}', Punctuation, '#pop'),
+        ],
+        'string': [
+            (r"'", String, '#pop'),
+            (r'\\([\\abfnrtv"\'?]|x[a-fA-F0-9]{2,4}|[0-7]{1,3})', String.Escape),
+            (r'\n', String),
+            (r"[^\\'\n]+", String), # all other characters
+            (r'\\\n', String),
+            (r'\\n', String), # line continuation
+            (r'\\', String), # stray backslash
+            ]
+        }
+
+    def get_tokens_unprocessed(self, text):
+        from pygments.lexers._asybuiltins import ASYFUNCNAME, ASYVARNAME
+        for index, token, value in \
+               RegexLexer.get_tokens_unprocessed(self, text):
+           if token is Name and value in ASYFUNCNAME:
+               token = Name.Function
+           elif token is Name and value in ASYVARNAME:
+               token = Name.Variable
+           yield index, token, value
--- a/MoinMoin/support/pygments/lexers/parsers.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/lexers/parsers.py	Sun Feb 21 23:52:54 2010 +0100
@@ -5,7 +5,7 @@
 
     Lexers for parser generators.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
--- a/MoinMoin/support/pygments/lexers/special.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/lexers/special.py	Sun Feb 21 23:52:54 2010 +0100
@@ -5,7 +5,7 @@
 
     Special lexers.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
--- a/MoinMoin/support/pygments/lexers/templates.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/lexers/templates.py	Sun Feb 21 23:52:54 2010 +0100
@@ -5,7 +5,7 @@
 
     Lexers for various template engines' markup.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
--- a/MoinMoin/support/pygments/lexers/text.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/lexers/text.py	Sun Feb 21 23:52:54 2010 +0100
@@ -5,7 +5,7 @@
 
     Lexers for non-source code file types.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
@@ -171,8 +171,8 @@
             (r'([a-zA-Z0-9_${}.-]+)(\s*)([!?:+]?=)([ \t]*)((?:.*\\\n|.*\n)+)',
              bygroups(Name.Variable, Text, Operator, Text, using(BashLexer))),
             # strings
-            (r'"(\\\\|\\"|[^"])*"', String.Double),
-            (r"'(\\\\|\\'|[^'])*'", String.Single),
+            (r'(?s)"(\\\\|\\.|[^"\\])*"', String.Double),
+            (r"(?s)'(\\\\|\\.|[^'\\])*'", String.Single),
             # targets
             (r'([^\n:]+)(:+)([ \t]*)', bygroups(Name.Function, Operator, Text),
              'block-header'),
--- a/MoinMoin/support/pygments/lexers/web.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/lexers/web.py	Sun Feb 21 23:52:54 2010 +0100
@@ -5,7 +5,7 @@
 
     Lexers for web-related languages and markup.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
--- a/MoinMoin/support/pygments/plugin.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/plugin.py	Sun Feb 21 23:52:54 2010 +0100
@@ -32,7 +32,7 @@
         yourfilter = yourfilter:YourFilter
 
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 try:
--- a/MoinMoin/support/pygments/scanner.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/scanner.py	Sun Feb 21 23:52:54 2010 +0100
@@ -12,7 +12,7 @@
     Have a look at the `DelphiLexer` to get an idea of how to use
     this scanner.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 import re
--- a/MoinMoin/support/pygments/style.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/style.py	Sun Feb 21 23:52:54 2010 +0100
@@ -5,7 +5,7 @@
 
     Basic style object.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
--- a/MoinMoin/support/pygments/styles/__init__.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/styles/__init__.py	Sun Feb 21 23:52:54 2010 +0100
@@ -5,7 +5,7 @@
 
     Contains built-in styles.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
@@ -22,6 +22,7 @@
     'autumn':   'autumn::AutumnStyle',
     'murphy':   'murphy::MurphyStyle',
     'manni':    'manni::ManniStyle',
+    'monokai':  'monokai::MonokaiStyle',
     'perldoc':  'perldoc::PerldocStyle',
     'pastie':   'pastie::PastieStyle',
     'borland':  'borland::BorlandStyle',
--- a/MoinMoin/support/pygments/styles/autumn.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/styles/autumn.py	Sun Feb 21 23:52:54 2010 +0100
@@ -5,7 +5,7 @@
 
     A colorful style, inspired by the terminal highlighting style.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
--- a/MoinMoin/support/pygments/styles/borland.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/styles/borland.py	Sun Feb 21 23:52:54 2010 +0100
@@ -5,7 +5,7 @@
 
     Style similar to the style used in the Borland IDEs.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
--- a/MoinMoin/support/pygments/styles/bw.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/styles/bw.py	Sun Feb 21 23:52:54 2010 +0100
@@ -5,7 +5,7 @@
 
     Simple black/white only style.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
--- a/MoinMoin/support/pygments/styles/colorful.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/styles/colorful.py	Sun Feb 21 23:52:54 2010 +0100
@@ -5,7 +5,7 @@
 
     A colorful style, inspired by CodeRay.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
--- a/MoinMoin/support/pygments/styles/default.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/styles/default.py	Sun Feb 21 23:52:54 2010 +0100
@@ -5,7 +5,7 @@
 
     The default highlighting style.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
--- a/MoinMoin/support/pygments/styles/emacs.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/styles/emacs.py	Sun Feb 21 23:52:54 2010 +0100
@@ -5,7 +5,7 @@
 
     A highlighting style for Pygments, inspired by Emacs.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
--- a/MoinMoin/support/pygments/styles/friendly.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/styles/friendly.py	Sun Feb 21 23:52:54 2010 +0100
@@ -5,7 +5,7 @@
 
     A modern style based on the VIM pyte theme.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
--- a/MoinMoin/support/pygments/styles/fruity.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/styles/fruity.py	Sun Feb 21 23:52:54 2010 +0100
@@ -5,7 +5,7 @@
 
     pygments version of my "fruity" vim theme.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
--- a/MoinMoin/support/pygments/styles/manni.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/styles/manni.py	Sun Feb 21 23:52:54 2010 +0100
@@ -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-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
--- a/MoinMoin/support/pygments/styles/murphy.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/styles/murphy.py	Sun Feb 21 23:52:54 2010 +0100
@@ -5,7 +5,7 @@
 
     Murphy's style from CodeRay.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
--- a/MoinMoin/support/pygments/styles/native.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/styles/native.py	Sun Feb 21 23:52:54 2010 +0100
@@ -5,7 +5,7 @@
 
     pygments version of my "native" vim theme.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
--- a/MoinMoin/support/pygments/styles/pastie.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/styles/pastie.py	Sun Feb 21 23:52:54 2010 +0100
@@ -7,7 +7,7 @@
 
     .. _pastie: http://pastie.caboo.se/
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
--- a/MoinMoin/support/pygments/styles/perldoc.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/styles/perldoc.py	Sun Feb 21 23:52:54 2010 +0100
@@ -7,7 +7,7 @@
 
     .. _perldoc: http://perldoc.perl.org/
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
--- a/MoinMoin/support/pygments/styles/tango.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/styles/tango.py	Sun Feb 21 23:52:54 2010 +0100
@@ -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-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
@@ -55,87 +55,87 @@
 
     styles = {
         # No corresponding class for the following:
-        #Text:              "", # class:  '',
-        Whitespace:                "underline #f8f8f8", # class: 'w',
-        Error:                     "#a40000 border:#ef2929", # class: 'err',
-        Other:                     "#000000",        # class 'x',
-
-        Comment:                   "italic #8f5902", # class: 'c',
-        Comment.Multiline:         "italic #8f5902", # class: 'cm',
-        Comment.Preproc:           "italic #8f5902", # class: 'cp',
-        Comment.Single:            "italic #8f5902", # class: 'c1',
-        Comment.Special:           "italic #8f5902", # class: 'cs',
+        #Text:                     "", # class:  ''
+        Whitespace:                "underline #f8f8f8",      # class: 'w'
+        Error:                     "#a40000 border:#ef2929", # class: 'err'
+        Other:                     "#000000",                # class 'x'
 
-        Keyword:                   "bold #204a87", # class: 'k',
-        Keyword.Constant:          "bold #204a87", # class: 'kc',
-        Keyword.Declaration:       "bold #204a87", # class: 'kd',
-        Keyword.Namespace:         "bold #204a87", # class: 'kn',
-        Keyword.Pseudo:            "bold #204a87", # class: 'kp',
-        Keyword.Reserved:          "bold #204a87", # class: 'kr',
-        Keyword.Type:              "bold #204a87", # class: 'kt',
+        Comment:                   "italic #8f5902", # class: 'c'
+        Comment.Multiline:         "italic #8f5902", # class: 'cm'
+        Comment.Preproc:           "italic #8f5902", # class: 'cp'
+        Comment.Single:            "italic #8f5902", # class: 'c1'
+        Comment.Special:           "italic #8f5902", # class: 'cs'
 
-        Operator:                  "bold #ce5c00", # class: 'o'
-        Operator.Word:             "bold #204a87", # class: 'ow' - like keywords
+        Keyword:                   "bold #204a87",   # class: 'k'
+        Keyword.Constant:          "bold #204a87",   # class: 'kc'
+        Keyword.Declaration:       "bold #204a87",   # class: 'kd'
+        Keyword.Namespace:         "bold #204a87",   # class: 'kn'
+        Keyword.Pseudo:            "bold #204a87",   # class: 'kp'
+        Keyword.Reserved:          "bold #204a87",   # class: 'kr'
+        Keyword.Type:              "bold #204a87",   # class: 'kt'
 
-        Punctuation:               "bold #000000", # class: 'p'
+        Operator:                  "bold #ce5c00",   # class: 'o'
+        Operator.Word:             "bold #204a87",   # class: 'ow' - like keywords
+
+        Punctuation:               "bold #000000",   # class: 'p'
 
         # because special names such as Name.Class, Name.Function, etc.
         # are not recognized as such later in the parsing, we choose them
         # to look the same as ordinary variables.
-        Name:                          "#000000",      # class: 'n'
-        Name.Attribute:                "#c4a000",      # class: 'na', - to be revised
-        Name.Builtin:                  "#204a87",      # class: 'nb'
-        Name.Builtin.Pseudo:           "#3465a4",      # class: 'bp'
-        Name.Class:                    "#000000",      # class: 'nc' - to be revised
-        Name.Constant:                 "#000000",      # class: 'no', - to be revised
-        Name.Decorator:                "bold #5c35cc", # class: 'nd', - to be revised
-        Name.Entity:                   "#ce5c00",      # class: 'ni',
-        Name.Exception:                "bold #cc0000", # class: 'ne',
-        Name.Function:                 "#000000",      # class: 'nf'
-        Name.Property:                 "#000000",      # class: 'py',
-        Name.Label:                    "#f57900",      # class: 'nl',
-        Name.Namespace:                "#000000",      # class: 'nn' - to be revised
-        Name.Other:                    "#000000",      # class: 'nx',
-        Name.Tag:                      "bold #204a87", # class'nt' -- like a keyword
-        Name.Variable:                 "#000000",      # class: 'nv', - to be revised
-        Name.Variable.Class:           "#000000",      # class: 'vc', - to be revised
-        Name.Variable.Global:          "#000000",      # class: 'vg', - to be revised
-        Name.Variable.Instance:        "#000000",      # class: 'vi', - to be revised
+        Name:                      "#000000",        # class: 'n'
+        Name.Attribute:            "#c4a000",        # class: 'na' - to be revised
+        Name.Builtin:              "#204a87",        # class: 'nb'
+        Name.Builtin.Pseudo:       "#3465a4",        # class: 'bp'
+        Name.Class:                "#000000",        # class: 'nc' - to be revised
+        Name.Constant:             "#000000",        # class: 'no' - to be revised
+        Name.Decorator:            "bold #5c35cc",   # class: 'nd' - to be revised
+        Name.Entity:               "#ce5c00",        # class: 'ni'
+        Name.Exception:            "bold #cc0000",   # class: 'ne'
+        Name.Function:             "#000000",        # class: 'nf'
+        Name.Property:             "#000000",        # class: 'py'
+        Name.Label:                "#f57900",        # class: 'nl'
+        Name.Namespace:            "#000000",        # class: 'nn' - to be revised
+        Name.Other:                "#000000",        # class: 'nx'
+        Name.Tag:                  "bold #204a87",   # class: 'nt' - like a keyword
+        Name.Variable:             "#000000",        # class: 'nv' - to be revised
+        Name.Variable.Class:       "#000000",        # class: 'vc' - to be revised
+        Name.Variable.Global:      "#000000",        # class: 'vg' - to be revised
+        Name.Variable.Instance:    "#000000",        # class: 'vi' - to be revised
 
         # since the tango light blue does not show up well in text, we choose
         # a pure blue instead.
-        Number:                        "bold #0000cf", # class: 'm'
-        Number.Float:                  "bold #0000cf", # class: ''mf',
-        Number.Hex:                    "bold #0000cf", # class: ''mh',
-        Number.Integer:                "bold #0000cf", # class: ''mi',
-        Number.Integer.Long:           "bold #0000cf", # class: ''il',
-        Number.Oct:                    "bold #0000cf", # class: ''mo',
-
-        Literal:                   "#000000",      # class: 'l',
-        Literal.Date:              "#000000",      # class: 'ld',
+        Number:                    "bold #0000cf",   # class: 'm'
+        Number.Float:              "bold #0000cf",   # class: 'mf'
+        Number.Hex:                "bold #0000cf",   # class: 'mh'
+        Number.Integer:            "bold #0000cf",   # class: 'mi'
+        Number.Integer.Long:       "bold #0000cf",   # class: 'il'
+        Number.Oct:                "bold #0000cf",   # class: 'mo'
 
-        String:                    "#4e9a06",      # class: 's',
-        String.Backtick:           "#4e9a06",      # class: 'sb',
-        String.Char:               "#4e9a06",      # class: 'sc',
-        String.Doc:                "italic #8f5902",  # class: 'sd' - like a comment
-        String.Double:             "#4e9a06",      # class: 's2',
-        String.Escape:             "#4e9a06",      # class: 'se',
-        String.Heredoc:            "#4e9a06",      # class: 'sh',
-        String.Interpol:           "#4e9a06",      # class: 'si',
-        String.Other:              "#4e9a06",      # class: 'sx',
-        String.Regex:              "#4e9a06",      # class: 'sr',
-        String.Single:             "#4e9a06",      # class: 's1',
-        String.Symbol:             "#4e9a06",      # class: 'ss',
+        Literal:                   "#000000",        # class: 'l'
+        Literal.Date:              "#000000",        # class: 'ld'
 
-        Generic:                   "#000000",      # class: 'g',
-        Generic.Deleted:           "#a40000",      # class: 'gd',
-        Generic.Emph:              "italic #000000",      # class: 'ge',
-        Generic.Error:             "#ef2929",      # class: 'gr',
-        Generic.Heading:           "bold #000080",      # class: 'gh',
-        Generic.Inserted:          "#00A000",      # class: 'gi',
-        Generic.Output:            "italic #000000",      # class: 'go',
-        Generic.Prompt:            "#8f5902",      # class: 'gp',
-        Generic.Strong:            "bold #000000",      # class: 'gs',
-        Generic.Subheading:        "bold #800080",      # class: 'gu',
-        Generic.Traceback:         "bold #a40000",      # class: 'gt',
+        String:                    "#4e9a06",        # class: 's'
+        String.Backtick:           "#4e9a06",        # class: 'sb'
+        String.Char:               "#4e9a06",        # class: 'sc'
+        String.Doc:                "italic #8f5902", # class: 'sd' - like a comment
+        String.Double:             "#4e9a06",        # class: 's2'
+        String.Escape:             "#4e9a06",        # class: 'se'
+        String.Heredoc:            "#4e9a06",        # class: 'sh'
+        String.Interpol:           "#4e9a06",        # class: 'si'
+        String.Other:              "#4e9a06",        # class: 'sx'
+        String.Regex:              "#4e9a06",        # class: 'sr'
+        String.Single:             "#4e9a06",        # class: 's1'
+        String.Symbol:             "#4e9a06",        # class: 'ss'
+
+        Generic:                   "#000000",        # class: 'g'
+        Generic.Deleted:           "#a40000",        # class: 'gd'
+        Generic.Emph:              "italic #000000", # class: 'ge'
+        Generic.Error:             "#ef2929",        # class: 'gr'
+        Generic.Heading:           "bold #000080",   # class: 'gh'
+        Generic.Inserted:          "#00A000",        # class: 'gi'
+        Generic.Output:            "italic #000000", # class: 'go'
+        Generic.Prompt:            "#8f5902",        # class: 'gp'
+        Generic.Strong:            "bold #000000",   # class: 'gs'
+        Generic.Subheading:        "bold #800080",   # class: 'gu'
+        Generic.Traceback:         "bold #a40000",   # class: 'gt'
     }
--- a/MoinMoin/support/pygments/styles/trac.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/styles/trac.py	Sun Feb 21 23:52:54 2010 +0100
@@ -5,7 +5,7 @@
 
     Port of the default trac highlighter design.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
--- a/MoinMoin/support/pygments/styles/vim.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/styles/vim.py	Sun Feb 21 23:52:54 2010 +0100
@@ -5,7 +5,7 @@
 
     A highlighting style for Pygments, inspired by vim.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
--- a/MoinMoin/support/pygments/styles/vs.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/styles/vs.py	Sun Feb 21 23:52:54 2010 +0100
@@ -5,7 +5,7 @@
 
     Simple style with MS Visual Studio colors.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
--- a/MoinMoin/support/pygments/token.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/token.py	Sun Feb 21 23:52:54 2010 +0100
@@ -5,7 +5,7 @@
 
     Basic token types and the standard tokens.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 try:
--- a/MoinMoin/support/pygments/unistring.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/unistring.py	Sun Feb 21 23:52:54 2010 +0100
@@ -8,7 +8,7 @@
 
     Inspired by chartypes_create.py from the MoinMoin project.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 from pygments.util import u_prefix
--- a/MoinMoin/support/pygments/util.py	Sun Feb 21 23:15:01 2010 +0100
+++ b/MoinMoin/support/pygments/util.py	Sun Feb 21 23:52:54 2010 +0100
@@ -5,7 +5,7 @@
 
     Utility functions.
 
-    :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 import re
--- a/docs/3rd_party_support_code.txt	Sun Feb 21 23:15:01 2010 +0100
+++ b/docs/3rd_party_support_code.txt	Sun Feb 21 23:52:54 2010 +0100
@@ -24,7 +24,7 @@
 
 pygments (highlighting for all sorts of source code and other text files)
 =========================================================================
-shipped: 1.1.1
+shipped: 1.2.2
 minimum: 1.1.1(?)