update pygments to support python3
This commit is contained in:
4
vendor/pygments/scripts/check_sources.py
vendored
4
vendor/pygments/scripts/check_sources.py
vendored
@@ -7,7 +7,7 @@
|
||||
Make sure each Python file has a correct file header
|
||||
including copyright and license information.
|
||||
|
||||
:copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
|
||||
:copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
|
||||
:license: BSD, see LICENSE for details.
|
||||
"""
|
||||
|
||||
@@ -30,7 +30,7 @@ def checker(*suffixes, **kwds):
|
||||
|
||||
|
||||
name_mail_re = r'[\w ]+(<.*?>)?'
|
||||
copyright_re = re.compile(r'^ :copyright: Copyright 2006-2012 by '
|
||||
copyright_re = re.compile(r'^ :copyright: Copyright 2006-2013 by '
|
||||
r'the Pygments team, see AUTHORS\.$', re.UNICODE)
|
||||
copyright_2_re = re.compile(r'^ %s(, %s)*[,.]$' %
|
||||
(name_mail_re, name_mail_re), re.UNICODE)
|
||||
|
||||
@@ -8,6 +8,8 @@ def main():
|
||||
|
||||
for name, aliases, filenames, mimetypes in get_all_lexers():
|
||||
cls = find_lexer_class(name)
|
||||
if not cls.aliases:
|
||||
print cls, "has no aliases"
|
||||
for f in filenames:
|
||||
if f not in uses:
|
||||
uses[f] = []
|
||||
|
||||
2
vendor/pygments/scripts/find_codetags.py
vendored
2
vendor/pygments/scripts/find_codetags.py
vendored
@@ -7,7 +7,7 @@
|
||||
Find code tags in specified files and/or directories
|
||||
and create a report in HTML format.
|
||||
|
||||
:copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
|
||||
:copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
|
||||
:license: BSD, see LICENSE for details.
|
||||
"""
|
||||
|
||||
|
||||
11
vendor/pygments/scripts/find_error.py
vendored
11
vendor/pygments/scripts/find_error.py
vendored
@@ -8,17 +8,16 @@
|
||||
the text where Error tokens are being generated, along
|
||||
with some context.
|
||||
|
||||
:copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
|
||||
:copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
|
||||
:license: BSD, see LICENSE for details.
|
||||
"""
|
||||
|
||||
import sys, os
|
||||
|
||||
try:
|
||||
import pygments
|
||||
except ImportError:
|
||||
# try parent path
|
||||
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
|
||||
# always prefer Pygments from source if exists
|
||||
srcpath = os.path.join(os.path.dirname(__file__), '..')
|
||||
if os.path.isdir(os.path.join(srcpath, 'pygments')):
|
||||
sys.path.insert(0, srcpath)
|
||||
|
||||
|
||||
from pygments.lexer import RegexLexer
|
||||
|
||||
Reference in New Issue
Block a user